# Python 3.10 taban imajını kullan FROM python:3.10-slim RUN apt-get update && apt-get install -y ffmpeg \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Çalışma dizinini ayarla WORKDIR /code # Önce gereksinimleri kopyala ve yükle COPY requirements.txt . RUN pip install --no-cache-dir --upgrade -r requirements.txt ENV NUMBA_CACHE_DIR=/tmp/numba_cache RUN mkdir -p /tmp/numba_cache && chmod 777 /tmp/numba_cache # [YENİ EKLEME] Hugging Face modelleri için yazılabilir bir cache dizini ayarla ENV HF_HOME /tmp/hf_cache # Proje dosyalarının geri kalanını kopyala COPY . . # FastAPI sunucunuz 7860 portunda çalışıyor (kodunuzda böyle yazıyor) EXPOSE 7860 # Sunucuyu başlatma komutu CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]