Download Dockerfile from anime-backend/stablediffusionapi: direct link, hf CLI and curl.
- Browser
- Download file 845 Bytes
-
https://huggingface.co/spaces/anime-backend/stablediffusionapi/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/anime-backend/stablediffusionapi/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/anime-backend/stablediffusionapi/resolve/main/Dockerfile
845 Bytes
| # Python 3.9 tabanlı bir imaj kullanıyoruz | |
| FROM python:3.9-slim | |
| # Çalışma dizinini ayarlıyoruz | |
| WORKDIR /app | |
| # Gerekli sistem paketlerini ve izinleri ayarlıyoruz | |
| RUN apt-get update && \ | |
| apt-get install -y sqlite3 && \ | |
| mkdir -p /data && \ | |
| chmod a+rwx /data && \ | |
| mkdir -p /tmp/torch_cache /tmp/numba_cache && \ | |
| chmod -R 777 /tmp && \ | |
| mkdir -p /app/flagged && \ | |
| chmod -R 777 /app && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Gerekli dosyaları konteynerin içine kopyalıyoruz | |
| COPY . /app | |
| # Bağımlılıkları yüklüyoruz | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Veritabanı için yazılabilir dizin | |
| ENV DATABASE_PATH=/data/udids.db | |
| # Uygulama portlarını açıyoruz (hem 5000 hem 7860) | |
| EXPOSE 5000 7860 | |
| # Flask'ı çalıştıran komutu belirtiyoruz | |
| CMD ["python", "app.py"] |