Update Dockerfile
Browse files- Dockerfile +17 -14
Dockerfile
CHANGED
@@ -1,26 +1,29 @@
|
|
1 |
-
#
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
-
#
|
5 |
-
RUN apt-get update && apt-get install -y
|
6 |
|
7 |
-
#
|
8 |
WORKDIR /app
|
9 |
-
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
|
10 |
|
11 |
-
#
|
12 |
ENV HF_HOME=/app/.cache \
|
13 |
-
|
|
|
|
|
|
|
14 |
|
15 |
-
#
|
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 |
-
#
|
23 |
COPY app.py .
|
24 |
|
25 |
-
#
|
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"]
|