File size: 772 Bytes
e1480cc 9870b98 e1480cc 9870b98 e1480cc |
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 |
# === Hugging Face Spaces için temel imaj
FROM python:3.10
# === Hugging Face Spaces özel dizinleri
RUN mkdir -p /data/chunks /data/tokenized_chunks /data/zip_temp /data/output /app/.cache /app/.torch_cache && chmod -R 777 /data /app
# === Ortam değişkenleri
ENV HF_HOME=/app/.cache \
HF_DATASETS_CACHE=/app/.cache \
HF_HUB_CACHE=/app/.cache \
TORCH_HOME=/app/.torch_cache
# PyTorch kernel cache için klasör ve izin tanımı
ENV TORCH_HOME=/app/.torch_cache
RUN mkdir -p /app/.torch_cache && chmod -R 777 /app/.torch_cache
# === Gereken kütüphaneleri yükle
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# === Uygulama dosyalarını kopyala
COPY . /app
WORKDIR /app
# === Başlangıç komutu
CMD ["python", "app.py"] |