File size: 741 Bytes
2df1810
 
11f2c82
 
5b63bfa
 
 
11f2c82
5b63bfa
 
 
 
11f2c82
 
5b63bfa
11f2c82
 
5b63bfa
11f2c82
5b63bfa
 
 
2df1810
 
 
 
5b63bfa
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

# Set environment variables
ENV PYTHONUNBUFFERED=1 \
    DEBIAN_FRONTEND=noninteractive \
    PIP_NO_CACHE_DIR=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1

# Install system dependencies first
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    libopenblas-dev \
    git \
    curl \
    cmake \
    && rm -rf /var/lib/apt/lists/*

# Install Python dependencies in two stages
COPY requirements.txt .
RUN pip install --upgrade pip setuptools wheel && \
    pip install torch --index-url https://download.pytorch.org/whl/cpu && \
    pip install -r requirements.txt

WORKDIR /app
COPY . /app

# Pre-create directories
RUN mkdir -p /app/checkpoints /app/logs

CMD ["python", "train.py"]