ai-trading-sys/Dockerfile
2025-05-22 18:48:03 +07:00

20 lines
No EOL
482 B
Docker

FROM python:3.10-slim
# Cài đặt các thư viện hệ thống cần thiết
RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
# Tạo thư mục app
WORKDIR /app
# Copy requirements và cài đặt
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy toàn bộ mã nguồn
COPY . .
# Expose port
EXPOSE 8000
# Lệnh chạy uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]