Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +17 -3
Dockerfile
CHANGED
@@ -1,10 +1,24 @@
|
|
1 |
FROM python:3.8-slim
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
WORKDIR /app
|
8 |
COPY . /app
|
9 |
|
|
|
|
|
|
|
10 |
CMD ["python", "train.py"]
|
|
|
1 |
FROM python:3.8-slim
|
2 |
|
3 |
+
# Set environment variables
|
4 |
+
ENV PYTHONUNBUFFERED=1 \
|
5 |
+
DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
# Install system dependencies
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
git \
|
10 |
+
curl \
|
11 |
+
&& rm -rf /var/lib/apt/lists/*
|
12 |
+
|
13 |
+
# Install Python dependencies
|
14 |
+
COPY requirements.txt .
|
15 |
+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
16 |
+
pip install --no-cache-dir -r requirements.txt
|
17 |
|
18 |
WORKDIR /app
|
19 |
COPY . /app
|
20 |
|
21 |
+
# Pre-create directories needed by training script
|
22 |
+
RUN mkdir -p /app/checkpoints /app/logs
|
23 |
+
|
24 |
CMD ["python", "train.py"]
|