{"id":14977202,"url":"https://github.com/mynameisvinn/docker-for-data-scientists","last_synced_at":"2025-07-24T22:15:13.323Z","repository":{"id":54709537,"uuid":"91042374","full_name":"mynameisvinn/Docker-for-Data-Scientists","owner":"mynameisvinn","description":"containerizing jupyter notebooks","archived":false,"fork":false,"pushed_at":"2022-12-07T23:37:05.000Z","size":36085,"stargazers_count":10,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-27T23:40:58.249Z","etag":null,"topics":["data-science","docker","docker-container","ipython-notebook"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mynameisvinn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-12T02:24:05.000Z","updated_at":"2024-01-04T16:13:59.000Z","dependencies_parsed_at":"2023-01-25T00:15:10.261Z","dependency_job_id":null,"html_url":"https://github.com/mynameisvinn/Docker-for-Data-Scientists","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mynameisvinn%2FDocker-for-Data-Scientists","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mynameisvinn%2FDocker-for-Data-Scientists/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mynameisvinn%2FDocker-for-Data-Scientists/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mynameisvinn%2FDocker-for-Data-Scientists/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mynameisvinn","download_url":"https://codeload.github.com/mynameisvinn/Docker-for-Data-Scientists/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219860225,"owners_count":16556023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","docker","docker-container","ipython-notebook"],"created_at":"2024-09-24T13:55:16.970Z","updated_at":"2024-10-11T15:40:54.480Z","avatar_url":"https://github.com/mynameisvinn.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# what's this?\nthis is the simplest example of sharing notebooks with docker. \n\n## lets get started\n### get it\nclone this repo with `git clone https://github.com/mynameisvinn/Docker-for-Data-Scientists`.\n\n### start docker daemon\ndo `systemctl start docker.service`\n\n### building da container\ndo `docker build -t mynameisvinn/ds .` which tells docker to build the container. \n\nit does so by executing a sequence of commands specified by the [dockerfile](https://github.com/mynameisvinn/Docker-for-Data-Scientists/blob/master/Dockerfile) including (a) fetching a base python 3.6 layer; (b) copying `requirements.txt` and the `notebooks` folder into the container; (c) executing shell commands such as `pip install`, setting the working directory to `home`, exposing port 8888, and finally launching a notebook.\n```bash\nFROM python:3.6-slim\n\nCOPY requirements.txt requirements.txt\nRUN pip install -r requirements.txt\n\nCOPY notebooks /home\nWORKDIR /home\n\n# Exposing ports\nEXPOSE 8888\n\n# Running jupyter notebook\n# --NotebookApp.token ='demo' is the password\nCMD [\"jupyter\", \"notebook\", \"--no-browser\", \"--ip 0.0.0.0\", \"--allow-root\", \"--NotebookApp.token='demo'\"]\n```\n\n### running da container\nnow that we've built the container, we can run it.\n\nwe run with `docker run -d -p 8887:8888 mynameisvinn/ds`. this container launches a notebook at `localhost:8887` (password: demo).\n\n### running it on ec2 - why not?\nassuming youve enabled traffic to port 8887, you could do everything above in an ec2 instance, and then access the notebook from your local machine by pointing your browser to $EC2_IP:8887.\n\n#### syncing files between local and container\nwe could also do `docker run -d -p 8887:8888 -v /Users/vincent1/dropbox/temp/Docker-for-Data-Scientists/shared_data:/home mynameisvinn/ds`, which maps local's `shared_data` folder with the container's `home` folder. \n\nother helpful commands:\n* *ssh into container* do `docker run -it mynameisvinn/ds`\n* *stop all containers*. do `docker stop $(docker ps -a -q)`. \n* *remove images*. do `docker rmi $(docker images -a -q)`. this will delete all images from local disk.\n* *[removing](https://stackoverflow.com/questions/51188657/image-is-being-used-by-stopped-container) dangling images*  do `docker system prune` will purge intermediate unnamed images. Depending on the sizes of containers you're using, this can save a considerable amount of disk space.\n\n## docker compose\nalternatively, assuming the [image can be pulled from dockerhub](https://hub.docker.com/r/mynameisvinn/ds/), you can run `docker-compose up`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmynameisvinn%2Fdocker-for-data-scientists","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmynameisvinn%2Fdocker-for-data-scientists","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmynameisvinn%2Fdocker-for-data-scientists/lists"}