Spaces:
Runtime error
Runtime error
Download Dockerfile from aephiday/cc-classification: direct link, hf CLI and curl.
- Browser
- Download file 802 Bytes
-
https://huggingface.co/spaces/aephiday/cc-classification/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/aephiday/cc-classification/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/aephiday/cc-classification/resolve/main/Dockerfile
802 Bytes
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies yang dibutuhkan | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt ./ | |
| COPY src/ ./src/ | |
| # Upgrade pip dan install requirements (ditambah upgrade numpy langsung di sini untuk jaga-jaga) | |
| RUN pip3 install --no-cache-dir --upgrade pip && \ | |
| pip3 install --no-cache-dir -r requirements.txt && \ | |
| pip3 install --no-cache-dir --upgrade numpy | |
| # Berikan hak akses penuh ke direktori /app (Wajib untuk Hugging Face) | |
| RUN chmod -R 777 /app | |
| # Hugging Face menggunakan port 7860 secara default | |
| EXPOSE 7860 | |
| # Gunakan port 7860 untuk Streamlit | |
| ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"] |