-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 862 Bytes
/
Dockerfile
File metadata and controls
39 lines (28 loc) · 862 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
32
33
34
35
36
37
38
39
# Start with Python 3.11 as base image (as specified in your pyproject.toml)
FROM python:3.11-slim
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Install PDM
RUN pip install --no-cache-dir pdm
# Copy PDM configuration files
COPY pyproject.toml pdm.lock* /app/
# Configure PDM to install packages in the same directory
ENV PDM_USE_VENV=false
ENV PYTHONPATH=/app/src
# Install dependencies
RUN pdm install --prod --no-editable
# Copy the rest of the application
COPY src /app/src
# Create the uploads directory
RUN mkdir -p /app/uploads
# Expose the port the application will run on
EXPOSE 8000
# Command to run the application
CMD ["pdm", "run", "start", "--host", "0.0.0.0"]