mistral7b / Dockerfile
ciyidogan's picture
Update Dockerfile
9870b98 verified
raw
history blame contribute delete
772 Bytes
# === 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"]