-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (30 loc) · 885 Bytes
/
Dockerfile
File metadata and controls
41 lines (30 loc) · 885 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
40
41
# Use Python 3.9 slim image as base
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies required for audio processing
RUN apt-get update && apt-get install -y \
libsndfile1 \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install UV
RUN pip install --no-cache-dir uv
# Copy project files
COPY pyproject.toml .
COPY uv.lock .
# Install Python dependencies using UV
RUN uv sync --frozen
# Copy application files
COPY *.py .
# Create directories for temporary files and output
RUN mkdir -p /app/temp /app/output
# Expose the port the app runs on
EXPOSE 8888
# Set environment variables
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8888/stats || exit 1
# Run the web server using UV
CMD ["uv", "run", "web_server.py"]