File size: 829 Bytes
4ba0ff0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# ✅ CUDA destekli minimal imaj
FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04

# ✅ Sistem bağımlılıkları
RUN apt-get update && apt-get install -y \
    python3 python3-pip git gcc g++ make \
    && apt-get clean

# ✅ Çalışma dizini
WORKDIR /app

# ✅ Hugging Face Spaces cache dizinleri
RUN mkdir -p /app/.cache /tmp/.triton /tmp/torchinductor_cache && chmod -R 777 /app/.cache /tmp/.triton /tmp/torchinductor_cache

# ✅ Ortam değişkenleri
ENV HF_HOME=/app/.cache \
    HF_HUB_CACHE=/app/.cache \
    TRITON_CACHE_DIR=/tmp/.triton \
    TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_cache \
    BITSANDBYTES_NOWELCOME=1

# ✅ Gereksinimler
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt

# ✅ Kodları kopyala
COPY . .

# ✅ Başlangıç komutu
CMD ["python3", "app.py"]