Spaces:
Sleeping
Sleeping
PERDYPTO commited on
Update Dockerfile
Browse files- Dockerfile +33 -5
Dockerfile
CHANGED
|
@@ -1,6 +1,34 @@
|
|
| 1 |
-
FROM python:3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
WORKDIR /app
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
COPY . .
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
# Install system dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
curl \
|
| 6 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
+
|
| 8 |
+
# Install uv for Python interpreter management
|
| 9 |
+
RUN pip install -q uv
|
| 10 |
+
|
| 11 |
+
# Install exact Python versions for AST validation
|
| 12 |
+
RUN uv python install 3.11.9 3.12.10 3.13.15 3.14.7
|
| 13 |
+
|
| 14 |
+
# Install Python dependencies
|
| 15 |
+
RUN pip install -q \
|
| 16 |
+
datasets>=4.8.0 \
|
| 17 |
+
huggingface_hub>=1.2.0 \
|
| 18 |
+
pyarrow>=20.0.0 \
|
| 19 |
+
orjson>=3.10.0 \
|
| 20 |
+
tqdm>=4.67.0
|
| 21 |
+
|
| 22 |
+
# Set working directory
|
| 23 |
WORKDIR /app
|
| 24 |
+
|
| 25 |
+
# Copy pipeline script
|
| 26 |
+
COPY pipeline.py /app/pipeline.py
|
| 27 |
+
|
| 28 |
+
# Persistent storage mount point (set in Space settings)
|
| 29 |
+
# The bucket will be mounted at /data at runtime
|
| 30 |
+
ENV DATA_ROOT=/data
|
| 31 |
+
ENV HF_HOME=/data/cache
|
| 32 |
+
|
| 33 |
+
# Entrypoint - creates necessary dirs then runs pipeline
|
| 34 |
+
ENTRYPOINT ["/bin/bash", "-c", "mkdir -p /data/state /data/tmp /data/final /data/cache && python /app/pipeline.py"]
|