dockerize-datascience
dockerize-datascience copied to clipboard
Dockerize Data Science
Dockerize Data Science
Bring your Data Science tasks to Docker! :whale:
This is the code repository for the accompanying Medium article series "How to dockerize [x]":
Installation
Add the content of dockerize-datascience.sh
to your .bashrc
or .zshrc
file.
Usage
Python
Choose your Python version:
Python version | Command |
---|---|
3.8 | python3.8 |
3.9 | python3.9 |
3.10 | python3.10 |
3.11 | python3.11 |
latest | python |
This will run your python script or your interactive Python session in a Docker container. The current directory is mounted into the container. If you want to install dependencies, you should use the Python environment.
Python environment
In order to create a new or use an existing Python environment, run one of the following commands in your project folder:
Python version | Command |
---|---|
3.8 | py-env-3.8 |
3.9 | py-env-3.9 |
3.10 | py-env-3.10 |
3.11 | py-env-3.11 |
latest | py-env |
The current directory is mounted into the container.
To delete the environment run py-env-del
in your project folder.
Jupyter (JupyterLab)
For Jupyter (to use in the browser) run
jupyter
This uses the franzdiebold/datascience-ultimate
Docker image.
The current directory is mounted into the container.
If you want to install dependencies, you should use the Jupyter environment.
Jupyter environment
In order to create a new or use an existing Jupyter environment, run the following command in your project folder:
jupyter-env
or shorter
je
This uses the franzdiebold/datascience-ultimate
Docker image.
The current directory is mounted into the container.
To delete the environment run jupyter-env-del
.
Jupyter Server
For Jupyter Server (to use with a different client software for your notebooks such as JetBrains DataSpell) run
jupyter-server
This uses the franzdiebold/datascience-ultimate-server
Docker image.
The current directory is mounted into the container.
If you want to install dependencies, you should use the Jupyter Server environment.
Jupyter Server environment
In order to create a new or use an existing Jupyter Server environment, run the following command in your project folder:
jupyter-server-env
or shorter
jes
This uses the franzdiebold/datascience-ultimate-server
Docker image.
The current directory is mounted into the container.
To delete the environment run jupyter-server-env-del
.