Spaces:
Sleeping
Sleeping
Download Dockerfile from Nolist/Model_AI_test2: direct link, hf CLI and curl.
- Browser
- Download file 644 Bytes
-
https://huggingface.co/spaces/Nolist/Model_AI_test2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Nolist/Model_AI_test2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Nolist/Model_AI_test2/resolve/main/Dockerfile
644 Bytes
| # --- Dockerfile --- | |
| FROM python:3.9-slim-buster | |
| # Tạo user không phải root | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| # Thiết lập môi trường | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| WORKDIR /app | |
| # Sao chép mã nguồn | |
| COPY --chown=user . /app | |
| # Cài đặt thư viện Python | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Tải trước NLTK stopwords | |
| ENV NLTK_DATA=/app/nltk_data | |
| RUN python -c "import nltk; nltk.download('stopwords', download_dir='/app/nltk_data')" | |
| # Mở cổng cho Streamlit | |
| EXPOSE 7860 | |
| # Khởi chạy ứng dụng | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |