test-oncu / Dockerfile
ciyidogan's picture
Create Dockerfile
4ba0ff0 verified
raw
history blame
829 Bytes
# ✅ 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"]