https://github.com/henrytseng/example_docker_scikit-learn
A quick example of using Scikit-Learn from a Docker container
https://github.com/henrytseng/example_docker_scikit-learn
docker scikit-learn
Last synced: about 2 months ago
JSON representation
A quick example of using Scikit-Learn from a Docker container
- Host: GitHub
- URL: https://github.com/henrytseng/example_docker_scikit-learn
- Owner: henrytseng
- Created: 2017-05-07T05:17:42.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-12T23:06:47.000Z (almost 8 years ago)
- Last Synced: 2025-03-24T05:46:47.164Z (over 1 year ago)
- Topics: docker, scikit-learn
- Language: Jupyter Notebook
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README.md
## Setup
Get Docker https://store.docker.com/
* MacOSX https://store.docker.com/editions/community/docker-ce-desktop-mac?tab=description
Check installation; you may need to use `sudo` depending on what environment/version-of-docker-machine you're running
Make sure your Docker service is running.
```
docker --version
```
Build container `Dockerfile`
```
docker build -t myjupyter .
```
Check image exists
```
docker images
```
## Run
Start container
```
docker run -p 8888:8888 -v "`pwd`/notebook":/notebook -i -t myjupyter
```
Check container is running
```
docker ps
```
Create the data set of 100k examples
pushd notebook/data/; ./create_example.rb --limit 100000 --do_write; popd
Direct your browser using the token given to you in the terminal window
http://localhost:8888/?token=49f039d31855ab1c6247201be0cb742499f34e8b14f01cc6
Check your environment with `notebook/check_env.ipynb`
Open up the notebook `notebook/01 - Example.ipynb` to take a look at the example.
## Shutdown
Get the container ID
```
docker ps
```
Remove the container (e.g. - if the container ID is `1fa4ab2cf395`)
```
docker kill 1fa4ab2cf395
```
Get a list of images
```
docker images
```
Remove image (e.g. - if the image ID is `1fa4ab2cf395`)
```
docker rmi 1fa4ab2cf395
```
## Debug
To explore container -- run interactive `/bin/bash` directly on the image
```
docker exec -i -t 516c87927968 /bin/bash
```