Docker image for the recommended Conda based environment for the Data Analysis and Machine Learning Applications course
- numpy
- scipy
- matplotlib
- seaborn
- h5py
- pytables
- pillow
- scikit-learn
- tensorflow
- tensorflow-probability
- keras
- pytorch
- jupyter
- nbdime
- pytest
- papermill
- daft
- wpca
- autograd
- astropy
- emcee
- astroml
- uproot
To use the Docker image first pull it down from Docker Hub
docker pull illinoismla/damla-env
and then run the image in a container while exposing the container's internal port 8888
with the -p
flag (this is necessary for Jupyter to be able to talk to the localhost
)
docker run -it -p 8888:8888 illinoismla/damla-env
Once inside the container activate note that the DAMLA Conda environment is already activated and should be shown in the terminal prompt
(DAMLA) physicist@<hostname>:~/data$
though you can also verify this by listing the conda environments
conda env list
# conda environments:
#
base /opt/miniconda
DAMLA * /opt/miniconda/envs/DAMLA
If you want anything you do in the container to safely persist then you should bindmount your local machine's file system to the container as a volume.
As an example, running the image with
docker run --rm -it -v $PWD:/home/physicist/data -p 8888:8888 illinoismla/damla-env
runs the container and bindmounts the current directory on the local host ($PWD
) to the path /home/physicist/data
in the container. This is now a shared space between the local machine and the container so that the files there are the same.
To verify this for yourself, in another terminal on your local machine create a new file
# local machine
touch hello.txt
if you now navigate to /home/physicist/data
in your container and ls
you should see the file. If you now edit the file inside the container
# container
echo "hello from the inside the container" >> hello.txt
then on the local machine you see that the file has been changed as expected
# local machine
cat hello.txt
# hello from the inside the container
If you now exit the container, the container is removed as the clean up flag --rm
was used. However, the files on the local machine have persisted
# local machine
ls hello.txt
# hello.txt