Spaces:
Sleeping
Sleeping
Download Dockerfile from ducdatit2002/emotion: direct link, hf CLI and curl.
- Browser
- Download file 761 Bytes
-
https://huggingface.co/spaces/ducdatit2002/emotion/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ducdatit2002/emotion/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ducdatit2002/emotion/resolve/main/Dockerfile
761 Bytes
| # Sử dụng image Python 3.9 slim làm base image | |
| FROM python:3.9-slim | |
| # Thiết lập thư mục làm việc | |
| WORKDIR /app | |
| # Cài đặt các gói hệ thống cần thiết | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy file requirements.txt vào container | |
| COPY requirements.txt . | |
| # Nâng cấp pip và cài đặt các thư viện Python từ requirements.txt | |
| RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| # Copy toàn bộ mã nguồn vào container (bao gồm cả thư mục checkpoint) | |
| COPY . . | |
| # Expose cổng mà API sẽ chạy | |
| EXPOSE 8000 | |
| # Khởi chạy ứng dụng với uvicorn | |
| CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8000"] | |