File size: 846 Bytes
bcf9056
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ccffbf6
 
bcf9056
 
 
 
ccffbf6
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel

WORKDIR /app

# Install Jupyter + training deps
RUN pip install --no-cache-dir \
    jupyter \
    unsloth \
    trl \
    transformers \
    datasets \
    accelerate \
    peft \
    huggingface_hub

# Copy source files needed for training
COPY generate_episodes.py models.py messages.py drift_events.py ./
COPY notebooks/ ./notebooks/

EXPOSE 8888

# Download training data at startup (build env may block outbound network), then launch Jupyter
CMD python -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='eptan/crisis-inbox-episodes', filename='episodes.json', repo_type='dataset', local_dir='/app'); import os; os.rename('/app/episodes.json', '/app/.episodes.json')" && \
    jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token=''