Spaces:
Sleeping

PERDYPTO commited on
Commit
a094fce
·
verified ·
1 Parent(s): ecab2c7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -5
Dockerfile CHANGED
@@ -1,6 +1,34 @@
1
- FROM python:3.12-slim
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  WORKDIR /app
3
- COPY requirements.txt .
4
- RUN pip install --no-cache-dir -r requirements.txt
5
- COPY . .
6
- CMD ["python", "-u", "-m", "uvicorn", "hf_space:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
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"]