ciyidogan commited on
Commit
8f5636a
·
verified ·
1 Parent(s): 95d7807

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -14
Dockerfile CHANGED
@@ -1,26 +1,29 @@
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 git gcc g++ make
6
 
7
- # Çalışma dizini ve izinler
8
  WORKDIR /app
9
- RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
10
 
11
- # Ortam değişkenleri
12
  ENV HF_HOME=/app/.cache \
13
- HF_HUB_CACHE=/app/.cache
 
 
 
14
 
15
- # Pip güncelle
16
- RUN pip install --upgrade pip
17
-
18
- # ✅ Gereksinim dosyalarını yükle
19
  COPY requirements.txt .
20
- RUN pip install -r requirements.txt
 
 
 
21
 
22
- # Uygulama dosyalarını kopyala
23
  COPY app.py .
24
 
25
- # FastAPI uygulaması burada
26
  CMD ["python", "app.py"]
 
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"]