Files changed (1) hide show
  1. Dockerfile +24 -21
Dockerfile CHANGED
@@ -1,22 +1,25 @@
1
- FROM python:3.10-slim
2
-
3
- # === Hugging Face Spaces özel dizinleri
4
- RUN mkdir -p /data/chunks /data/projects /data/tokenized_chunks /data/zip_temp /data/output /app/.cache /app/.torch_cache && chmod -R 777 /data /app
5
-
6
- # === Ortam değişkenleri
7
- ENV HF_HOME=/app/.cache \
8
- HF_DATASETS_CACHE=/app/.cache \
9
- HF_HUB_CACHE=/app/.cache \
10
- TORCH_HOME=/app/.torch_cache
11
-
12
- # PyTorch kernel cache için klasör
13
- ENV TORCH_HOME=/app/.torch_cache
14
-
15
- # ✅ Tüm proje klasörünü kopyala
16
- COPY . .
17
-
18
- # Install Python dependencies
19
- RUN pip install --no-cache-dir -r requirements.txt
20
-
21
- # Çalıştırılacak komut
 
 
 
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # ✅ Base image
2
+ FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04
3
+
4
+ # Hugging Face Spaces özel dizinleri
5
+ RUN mkdir -p /app/.cache /tmp/.triton /tmp/torchinductor_cache && chmod -R 777 /app /tmp
6
+
7
+ # Sistem bağımlılıkları
8
+ RUN apt-get update && \
9
+ apt-get install -y git gcc g++ make && \
10
+ rm -rf /var/lib/apt/lists/*
11
+
12
+ # Çalışma dizini
13
+ WORKDIR /app
14
+
15
+ # ✅ Gereksinimler
16
+ COPY requirements.txt .
17
+ RUN pip install --upgrade pip
18
+ RUN pip install -r requirements.txt
19
+
20
+ # ✅ Uygulama dosyaları
21
+ COPY . .
22
+
23
+ # ✅ Port ve çalışma komutu
24
+ EXPOSE 7860
25
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]