| FROM python:3.10-slim | |
| # Çalışma dizinini ayarla | |
| WORKDIR /app | |
| # Gerekli sistem araçlarını yükle (curl ve tar) | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| tar \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Repoyu doğrudan ZIP/Tarball olarak indir ve /app dizinine aç | |
| RUN curl -L https://github.com/mfoud444/ollamafreeapp/archive/refs/heads/main.tar.gz | tar -xz --strip-components=1 | |
| # Bağımlılıkları yükle | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Hugging Face Spaces portunu ayarla | |
| EXPOSE 7860 | |
| # Uygulamayı başlat | |
| CMD ["python", "app.py", "--port", "7860", "--host", "0.0.0.0"] |