Machine Learning Development Environment

This project sets up a Dockerized environment for machine learning development with Jupyter Notebook and a Java service. It uses NVIDIA CUDA for GPU acceleration and provides a clean, portable setup for your development needs.

In reality i got tired for setting up python, and jupyter on several differnet os's windows, mac linux and all the computers. I can clone this and go.

The other project is java, and ubuntu mode includes cuda. in most cases for me since i have nvidia cards i want cuda for models/infrence. Just follow mac-style if you want jupyter only.

This started because I use linux a lot; I don't like polluting my machine with dependnecies like cuda and various python libraries and whatever else gets pulled in so I use docker.

Prerequisites

  • Docker
  • Docker Compose
  • NVIDIA Docker (for GPU support)
  • Make

Setup Instructions

Step 1: Clone the Repository

Clone the repository and navigate to the project directory.

git clone <your-repo-url>
cd machine_learning

Step 2: Build Docker Images

To build the Docker images, run:

make build

Step 3: Start Docker Containers

To start the Docker containers, run:

make up

Step 4: Access Jupyter Notebook

Open your web browser and go to http://localhost:8888. You should see the Jupyter Notebook interface.

Makefile Targets

The Makefile provides several useful targets for managing and diagnosing the application:

Build Docker images

make build

Start Docker containers

make up

Stop Docker containers

make down

Clean Docker environment (removes containers and images)

make clean

Remove Docker images

make rmi

Show Docker containers

make ps

Logs from Docker containers

make logs

Export environment variables from .env file

make export

Ensure all necessary directories are created

make setup

Initialize the environment

make init

Folders: machine_learning/ ├── docker-compose.yml ├── docker-compose.linux.yml ├── docker-compose.mac.yml ├── Dockerfile.base ├── Dockerfile.jupyter ├── Dockerfile.jupyter.mac ├── Makefile ├── requirements-common.txt ├── requirements-jupyter.txt ├── requirements-jupyter-mac.txt ├── java/ └── jupyter/