diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..71962cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +# ============================================================================= +# GIE_Eris - Media Pipeline Development Environment +# GPU-enabled Python + Jupyter for diffusion model experimentation +# ============================================================================= + +FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime + +# Avoid interactive prompts during build +ENV DEBIAN_FRONTEND=noninteractive + +# System dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + wget \ + curl \ + vim \ + libgl1-mesa-glx \ + libglib2.0-0 \ + && rm -rf /var/lib/apt/lists/* + +# Set working directory +WORKDIR /workspace + +# Install Python dependencies +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +# Jupyter config: no token/password for local dev +RUN mkdir -p /root/.jupyter +RUN echo "c.NotebookApp.token = ''" >> /root/.jupyter/jupyter_notebook_config.py && \ + echo "c.NotebookApp.password = ''" >> /root/.jupyter/jupyter_notebook_config.py && \ + echo "c.NotebookApp.allow_origin = '*'" >> /root/.jupyter/jupyter_notebook_config.py + +# HuggingFace cache inside container (mapped via volume) +ENV HF_HOME=/workspace/.cache/huggingface +ENV TRANSFORMERS_CACHE=/workspace/.cache/huggingface + +# Default: start Jupyter +EXPOSE 8888 +CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--notebook-dir=/workspace"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..01a63b8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +services: + jupyter: + build: . + container_name: gie-eris-jupyter + ports: + - "${JUPYTER_PORT:-8888}:8888" + volumes: + - ./notebooks:/workspace/notebooks + - ./media-pipeline:/workspace/media-pipeline + - ./scripts:/workspace/scripts + - ${HF_CACHE_DIR:-./.cache/huggingface}:/workspace/.cache/huggingface + env_file: + - .env + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + restart: unless-stopped diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2865af5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +torch>=2.3.0 +diffusers>=0.29.0 +transformers>=4.41.0 +accelerate>=0.31.0 +safetensors>=0.4.0 +peft>=0.11.0 + +jupyter>=1.0.0 +ipywidgets>=8.1.0 +matplotlib>=3.9.0 +Pillow>=10.3.0