This repository contains a Docker Compose configuration along with two Dockerfiles to set up a custom Jupyter environment with additional Python libraries.
Before you begin, ensure you have Docker and Docker Compose installed on your system.
-
Clone this repository to your local machine:
git clone https://github.com/AYMNrh/jupyter-custom.git
-
Navigate to the cloned repository:
cd jupyter-custom
-
Build and start the Docker containers using Docker Compose:
docker_compose up
-
Once the containers are running, you can access the Jupyter Notebook interface by opening a web browser and navigating to
http://localhost:8888
. -
When prompted, enter the token displayed in the terminal to log in to Jupyter Notebook.
The docker-compose.yml file defines two services:
-
python-libraries
: Builds a Docker container based on theDockerfile.libraries
file. It installs Python libraries listed in therequirements.txt
file into a volume namedjupyter-libraries
. -
jupyter
: Builds a Docker container based on theDockerfile.jupyter
file. It sets up a Jupyter environment with SciPy and exposes port 8888. It also mounts thenotebooks
directory from the host machine and thejupyter-libraries
volume.
This Dockerfile sets up a Jupyter environment based on the jupyter/scipy-notebook
image. It exposes port 8888 and sets the working directory to /app
. The command start-notebook.sh
is used to start the Jupyter Notebook server.
This Dockerfile sets up a Python environment based on the python:3
image. It installs the Python libraries listed in the requirements.txt
file into a specified directory /libraries
.
- Python Libraries: Modify the
requirements.txt
file to include any additional Python libraries you require. - Jupyter Configuration: Adjust the Jupyter configuration in the
Dockerfile.jupyter
file as needed.