Create Dockerfile
Browse files- Dockerfile +30 -0
Dockerfile
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ✅ CUDA destekli minimal imaj
|
2 |
+
FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04
|
3 |
+
|
4 |
+
# ✅ Sistem bağımlılıkları
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
+
python3 python3-pip git gcc g++ make \
|
7 |
+
&& apt-get clean
|
8 |
+
|
9 |
+
# ✅ Çalışma dizini
|
10 |
+
WORKDIR /app
|
11 |
+
|
12 |
+
# ✅ Hugging Face Spaces cache dizinleri
|
13 |
+
RUN mkdir -p /app/.cache /tmp/.triton /tmp/torchinductor_cache && chmod -R 777 /app/.cache /tmp/.triton /tmp/torchinductor_cache
|
14 |
+
|
15 |
+
# ✅ Ortam değişkenleri
|
16 |
+
ENV HF_HOME=/app/.cache \
|
17 |
+
HF_HUB_CACHE=/app/.cache \
|
18 |
+
TRITON_CACHE_DIR=/tmp/.triton \
|
19 |
+
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_cache \
|
20 |
+
BITSANDBYTES_NOWELCOME=1
|
21 |
+
|
22 |
+
# ✅ Gereksinimler
|
23 |
+
COPY requirements.txt .
|
24 |
+
RUN pip install --upgrade pip && pip install -r requirements.txt
|
25 |
+
|
26 |
+
# ✅ Kodları kopyala
|
27 |
+
COPY . .
|
28 |
+
|
29 |
+
# ✅ Başlangıç komutu
|
30 |
+
CMD ["python3", "app.py"]
|