-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 809 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.11-slim AS base
LABEL maintainer="emilcode-dev"
# Set working directory
WORKDIR /app
# Additional dev tooling (e.g. Git, etc.)
# RUN apt-get update && apt-get install -y --no-install-recommends \
# ffmpeg \
# && rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --upgrade pip
# Install requirements
COPY requirements_prod.txt .
RUN pip install --no-cache-dir -r requirements_prod.txt
# # python production requirements
# RUN --mount=type=bind,source=requirements.txt,target=/tmp/requirements.txt \
# pip install --requirement /tmp/requirements.txt
COPY . .
RUN pip install --no-cache-dir .
# Ensure logs are flushed immediately
ENV PYTHONUNBUFFERED=1
EXPOSE 8080
CMD ["uvicorn", "app.fastapi.main:app", "--host", "0.0.0.0", "--port", "8080"]