Spaces:
Sleeping
Sleeping
Download Dockerfile from omniverse1/IDX-Chronos-API: direct link, hf CLI and curl.
- Browser
- Download file 676 Bytes
-
https://huggingface.co/spaces/omniverse1/IDX-Chronos-API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/omniverse1/IDX-Chronos-API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/omniverse1/IDX-Chronos-API/resolve/main/Dockerfile
676 Bytes
| # Mulai dari base image Python | |
| FROM python:3.10-slim | |
| # Tetapkan direktori kerja di dalam container | |
| WORKDIR /code | |
| # Salin file requirements terlebih dahulu untuk caching layer Docker | |
| COPY ./requirements.txt /code/requirements.txt | |
| # Instal dependensi | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Salin semua file proyek Anda ke dalam direktori kerja | |
| COPY . /code/ | |
| # Beri tahu Docker bahwa container berjalan di port 7860 | |
| EXPOSE 7860 | |
| # Perintah untuk menjalankan aplikasi saat container dimulai | |
| # Kita menggunakan port 7860 agar sesuai dengan default Hugging Face | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |