This document provides clear instructions for setting up and effectively using the development environment for this project. We're leveraging Docker Compose for container management, a streamlined shell script for service interaction, and Jupyter Lab for interactive development and experimentation.
Our development environment relies on the following key components:
- Docker Compose: Orchestrate service (container) needed for development.
up_service.sh: A custom shell script to simplify starting the development environment.- Jupyter Lab: Provides an interactive environment for coding, data exploration, and model development.
requirements.txt: This file lists all the necessary Python packages for the project.uv: the pip alternative for faster operation.
Here's how to get the development environment up and running on your local machine.
-
Navigate to the Project Root: Open your terminal and use the
cdcommand to navigate to the root directory of the project. This is where thedocker-compose.ymlandup_service.shfiles reside. -
Run the Startup Script: Execute the
up_service.shscript to build (if needed) and start the Docker containers../up_service.sh
docker compose up --build -d
This script streamlines the process of building and running the containers defined in
docker-compose.yml.
-
Open Your Browser: Once the
up_service.shscript has successfully completed, Jupyter Lab will be running inside a Docker container. -
Access the Web Interface: Access the Jupyter Lab interface in your web browser at:
http://localhost:8888/labYou can immediately start working within Jupyter Lab.
When you're finished with your development session, or if you want to completely rebuild the environment, use the following command to stop and remove all associated resources.
- Stoping containers:
./remove-all.sh
docker compose down -vTo install new package use uv commands in shell command.
uv pip install <package_name>You can install new packages by including new package into requirements.txt and rebuilding the image.
Note: Remember to restart the notebook kernel.