21 lines
469 B
Docker
21 lines
469 B
Docker
# download image here: https://docker.aityp.com/image/docker.io/python:3.12-slim
|
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.12-slim
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy requirements file
|
|
COPY requirements.txt .
|
|
|
|
# Install dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Expose port
|
|
EXPOSE 8009
|
|
|
|
# Start command
|
|
CMD ["uvicorn", "webapi.main:app", "--host", "0.0.0.0", "--port", "8009"]
|