Add Docker environment setup
This commit is contained in:
40
Dockerfile
Normal file
40
Dockerfile
Normal file
@@ -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"]
|
||||||
21
docker-compose.yml
Normal file
21
docker-compose.yml
Normal file
@@ -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
|
||||||
11
requirements.txt
Normal file
11
requirements.txt
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user