File size: 787 Bytes
aa74750
 
 
878fa62
 
 
 
aa74750
 
 
1f36aaf
aa74750
 
 
f40cd47
 
 
1f36aaf
 
 
aa74750
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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"]