test-oncu / Dockerfile
ciyidogan's picture
Update Dockerfile
ebf9b74 verified
raw
history blame
969 Bytes
# ✅ Temel Python imajı
FROM python:3.10-slim
# ✅ Sistem bağımlılıkları (git dahil!)
RUN apt-get update && apt-get install -y gcc g++ make git
# ✅ Çalışma dizini ve izinler
WORKDIR /app
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_DATASETS_CACHE=/app/.cache \
HF_HUB_CACHE=/app/.cache \
TRITON_CACHE_DIR=/tmp/.triton \
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_cache
# ✅ Pip güncelle
RUN pip install --upgrade pip
# ✅ Torch 2.0.1 + cu118 yükle (Unsloth ile uyumlu)
RUN pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118
# ✅ Gereksinim dosyalarını yükle
COPY requirements.txt .
RUN pip install -r requirements.txt
# ✅ Uygulama dosyalarını kopyala
COPY app.py .
# ✅ FastAPI uygulaması burada
CMD ["python", "app.py"]