Spaces:
Runtime error
Runtime error
Download Dockerfile from tuan243/checkSound: direct link, hf CLI and curl.
- Browser
- Download file 620 Bytes
-
https://huggingface.co/spaces/tuan243/checkSound/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/tuan243/checkSound/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/tuan243/checkSound/resolve/main/Dockerfile
620 Bytes
| FROM python:3.10 | |
| # Tạo user không root để tăng tính bảo mật | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| # Thiết lập biến môi trường PATH | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Cài đặt thư mục làm việc | |
| WORKDIR /app | |
| # Sao chép file requirements.txt và cài đặt các dependencies | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Sao chép toàn bộ mã nguồn vào container | |
| COPY --chown=user . /app | |
| # Chạy ứng dụng FastAPI trên cổng 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |