oncu / Dockerfile
ciyidogan's picture
Update Dockerfile
004a453 verified
raw
history blame
710 Bytes
# === Temel Python imajı
FROM python:3.10-slim
# === Gerekli sistem bağımlılıkları (C derleyicisi dahil)
RUN apt-get update && apt-get install -y gcc g++ make
# === Çalışma dizini
WORKDIR /app
# === Python kütüphaneleri yükle
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# === Hugging Face cache dizinleri ve Triton cache dizini
RUN mkdir -p /app/.cache /tmp/.triton && chmod -R 777 /app/.cache /tmp/.triton
ENV HF_HOME=/app/.cache \
HF_DATASETS_CACHE=/app/.cache \
HF_HUB_CACHE=/app/.cache \
TRITON_CACHE_DIR=/tmp/.triton
# === Uygulama dosyaları
COPY . .
# === Uygulama başlatma
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]