Spaces:
Sleeping
Sleeping
| FROM python:3.9 | |
| # Set working directory | |
| WORKDIR /code | |
| # Copy requirements file dan install library | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy file aplikasi (app.py) | |
| COPY ./app.py /code/app.py | |
| # Buat folder gallery dan berikan izin akses (PENTING agar bisa simpan gambar) | |
| RUN mkdir -p /code/gallery_storage && chmod 777 /code/gallery_storage | |
| # Perintah untuk menjalankan server di port 7860 (Port standar HF) | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |