Spaces:
Build error
Build error
File size: 764 Bytes
2df1810 52d2f6a 11f2c82 5b63bfa 52d2f6a 11f2c82 52d2f6a 5b63bfa 11f2c82 5b63bfa 11f2c82 52d2f6a 11f2c82 5b63bfa 52d2f6a 5b63bfa 2df1810 52d2f6a 11f2c82 2df1810 |
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 26 27 28 29 30 |
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"] |