Spaces:
Sleeping
Sleeping
| # Standart bir Python 3.10 imajı kullan | |
| FROM python:3.10-slim | |
| # Konteyner içinde /code adında bir klasör oluştur ve oraya geç | |
| WORKDIR /code | |
| # Önce requirements.txt dosyasını kopyala ve kütüphaneleri kur | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Şimdi app.py kodunu kopyala | |
| COPY ./app.py /code/app.py | |
| # Hugging Face'in dışarıdan erişim için beklediği port | |
| EXPOSE 7860 | |
| # Uygulamayı FastAPI sunucusu (uvicorn) ile başlat | |
| # 0.0.0.0 adresi ve 7860 portu üzerinden yayın yap | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |