context-corruption-env / Dockerfile.train
Siddh12334's picture
fix: choose writable cache root at space startup
3125dc1
raw
history blame contribute delete
790 Bytes
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y git build-essential && rm -rf /var/lib/apt/lists/*
# Stable cu121 torch — TorchAO import shims are applied at runtime before Unsloth loads.
RUN pip install --no-cache-dir \
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 && \
pip install --no-cache-dir \
trl transformers datasets accelerate peft bitsandbytes \
openenv-core fastapi uvicorn pydantic \
wandb faker python-dotenv gradio && \
pip install --no-cache-dir unsloth_zoo && \
pip install --no-cache-dir "unsloth @ git+https://github.com/unslothai/unsloth.git"
COPY . .
RUN python -m data.loader || echo "Will use fallback facts"
EXPOSE 7860
CMD ["python", "-m", "training.space_runner"]