ciyidogan commited on
Commit
9435b5b
·
verified ·
1 Parent(s): f1e3b60

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -17
Dockerfile CHANGED
@@ -1,29 +1,25 @@
1
- # === Temel Python imajı
2
  FROM python:3.10-slim
3
 
4
- # === Sistem bağımlılıkları (C derleyicisi + bazı temel lib'ler)
5
  RUN apt-get update && apt-get install -y gcc g++ make
6
 
7
- # === Çalışma dizini ve izinler
8
- WORKDIR /app
9
- RUN mkdir -p /app/.cache /tmp/.triton /tmp/torchinductor_cache && chmod -R 777 /app/.cache /tmp/.triton /tmp/torchinductor_cache
10
 
11
- # === Ortam değişkenleri
12
  ENV HF_HOME=/app/.cache \
13
  HF_DATASETS_CACHE=/app/.cache \
14
- HF_HUB_CACHE=/app/.cache \
15
- TRITON_CACHE_DIR=/tmp/.triton \
16
- TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_cache
 
17
 
18
- # === Gereksinimler
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
- # === Triton ve bitsandbytes eklemeleri
23
- RUN pip install --no-cache-dir triton bitsandbytes
24
-
25
- # === Uygulama dosyaları
26
- COPY app.py .
27
 
28
- # === Çalıştırma
29
- CMD ["python", "app.py"]
 
1
+ # Temel Python imajı
2
  FROM python:3.10-slim
3
 
4
+ # Sistem bağımlılıkları
5
  RUN apt-get update && apt-get install -y gcc g++ make
6
 
7
+ # Hugging Face Spaces özel dizinleri
8
+ RUN mkdir -p /app/.cache && chmod -R 777 /app
 
9
 
 
10
  ENV HF_HOME=/app/.cache \
11
  HF_DATASETS_CACHE=/app/.cache \
12
+ HF_HUB_CACHE=/app/.cache
13
+
14
+ # ✅ Çalışma dizini
15
+ WORKDIR /app
16
 
17
+ # Gereksinimler
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Uygulama dosyası
22
+ COPY test_server.py .
 
 
 
23
 
24
+ # Uygulamayı başlat
25
+ CMD ["python", "test_server.py"]