gptoss / Dockerfile
wynai's picture
Create Dockerfile
054a528 verified
raw
history blame contribute delete
399 Bytes
# Sử dụng Python base image
FROM python:3.11-slim
# Tạo thư mục làm việc
WORKDIR /app
# Copy file requirements.txt và cài đặt
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy toàn bộ code vào container
COPY main.py .
# Mở port 7860
EXPOSE 7860
# Chạy API bằng uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]