Saturday, June 22, 2019

Setting up Docker for data science: rstudio and jupyter

References
https://towardsdatascience.com/a-short-guide-to-using-docker-for-your-data-science-environment-912617b3603e

https://jupyter-docker-stacks.readthedocs.io/en/latest/

https://hub.docker.com/r/rocker/rstudio/


Installation:

Tricky installation on Windows


  • download the desktop version
  • click nexts
  • run run docker hello-world  -> throws an error
  • Fixed by IT, issue with Hyper V
  • On boot took a long time to start -> Docker right click and reset


RStudio

docker run --rm -p 8787:8787 -e PASSWORD=yourpasswordhere rocker/rstudio

Use any password except rstudio

open the URL 127.0.0.1:8787

Enter rstudio and password


Jupyter

docker run -p 8888:8888 jupyter/scipy-notebook:17aba6048f44

Then open link which is printed out


Mounting a local folder
docker run -P -v "path_to_shared_local_directory":/home/jovyan/work/ -t cvbi/datascience-environment


Change "path_to_shared_local_directory" to a folder on the laptop

Got an error

docker: Error response from daemon: Drive sharing seems blocked by a firewall.
See 'docker run --help'.


Stop and remove a container

docker stop image_name
docker rm image_name



Save changes to container

After doing the changes

docker commit CONTAINER_ID new_name
docker stop CONTAINER_ID

docker rm CONTAINER_ID


Script to automate saving a container


https://github.com/zoobab/docker-save-running-containers

Restart

docker run -p xxxx:xxxx new_name





No comments:

Post a Comment

Loud fan of desktop

 Upon restart the fan of the desktop got loud again. I cleaned the desktop from the dust but it was still loud (Lower than the first sound) ...