Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +10 -10
Dockerfile
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
# === Temel Python imajı
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
-
# === Gerekli sistem bağımlılıkları
|
5 |
RUN apt-get update && apt-get install -y gcc g++ make
|
6 |
|
7 |
-
# === UID 1000 kullanıcı ekle (Torch için
|
8 |
RUN adduser --uid 1000 --disabled-password --gecos '' appuser
|
9 |
|
10 |
# === Çalışma dizini ve izinler
|
@@ -18,15 +18,15 @@ ENV HF_HOME=/app/.cache \
|
|
18 |
TRITON_CACHE_DIR=/tmp/.triton \
|
19 |
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_cache
|
20 |
|
21 |
-
# ===
|
22 |
-
COPY requirements.txt .
|
23 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
24 |
-
|
25 |
-
# === Uygulama dosyaları
|
26 |
COPY . .
|
27 |
|
28 |
-
# ===
|
29 |
-
|
|
|
|
|
|
|
|
|
30 |
|
31 |
# === Uygulama başlatma
|
32 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
# === Temel Python imajı
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
+
# === Gerekli sistem bağımlılıkları (C derleyicisi dahil)
|
5 |
RUN apt-get update && apt-get install -y gcc g++ make
|
6 |
|
7 |
+
# === UID 1000 kullanıcı ekle (bazı Torch hataları için)
|
8 |
RUN adduser --uid 1000 --disabled-password --gecos '' appuser
|
9 |
|
10 |
# === Çalışma dizini ve izinler
|
|
|
18 |
TRITON_CACHE_DIR=/tmp/.triton \
|
19 |
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_cache
|
20 |
|
21 |
+
# === Gereken dosyaları kopyala
|
|
|
|
|
|
|
|
|
22 |
COPY . .
|
23 |
|
24 |
+
# === Requirements yükleme
|
25 |
+
COPY requirements.txt ./
|
26 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
27 |
+
|
28 |
+
# === Hugging Face Spaces özel dizinleri (izin ayarları)
|
29 |
+
RUN mkdir -p /data/chunks /data/tokenized_chunks && chmod -R 777 /data
|
30 |
|
31 |
# === Uygulama başlatma
|
32 |
+
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|