This repository contains a Docker Compose configuration file (docker-compose-ml.yml) to set up a JupyterLab environment with Python 3.8 for machine learning tasks.
Before you begin, ensure you have Docker and Docker Compose installed on your system.
Below is the Docker Compose configuration for setting up a JupyterLab environment with Python 3.8.
version: '3'
services:
jupyterlab:
image: jupyter/base-notebook:python-3.8
ports:
- "8888:8888"
volumes:
- ./notebooks:/home/jovyan/work
environment:
- JUPYTER_ENABLE_LAB=yesWe have defined a service named jupyterlab with the following specifications:
- Docker image:
jupyter/base-notebook:python-3.8, which includes Python 3.8 and JupyterLab pre-installed. - Port Mapping: We map port 8888 from the container to port 8888 on your host machine for accessing JupyterLab in a web browser.
- Volume: We create a volume named
./notebooksand mount it to the/home/jovyan/workdirectory inside the container. This allows you to persist your JupyterLab notebooks and data outside the container. - Environment Variable: We set the
JUPYTER_ENABLE_LABenvironment variable to "yes" to enable JupyterLab.
To run the docker-compose-ml.yml file, use the following command:
docker-compose -f docker-compose-ml.yml up -dClone this repository to your local machine:
git clone https://github.com/your-username/docker-ml.git
cd docker-ml