Spaces:
Build error
Build error
FROM python:3.8-slim | |
# 1. Set environment variables | |
ENV PYTHONUNBUFFERED=1 \ | |
DEBIAN_FRONTEND=noninteractive \ | |
PIP_NO_CACHE_DIR=1 | |
# 2. Install system dependencies | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
build-essential \ | |
libopenblas-dev \ | |
git \ | |
curl \ | |
cmake \ | |
&& rm -rf /var/lib/apt/lists/* | |
# 3. Install Python packages in optimal order | |
COPY requirements.txt . | |
RUN pip install --upgrade pip setuptools wheel && \ | |
pip install torch==2.2.1 --index-url https://download.pytorch.org/whl/cpu && \ | |
pip install --no-deps vllm==0.3.0 && \ | |
pip install -r requirements.txt | |
WORKDIR /app | |
COPY . /app | |
# 4. Create necessary directories | |
RUN mkdir -p /app/checkpoints /app/logs | |
CMD ["python", "train.py"] |