-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (34 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
44 lines (34 loc) · 1.06 KB
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
42
43
44
# Use CUDA-enabled base image compatible with PyTorch 2.5.1
FROM nvcr.io/nvidia/cuda:12.9.1-cudnn-devel-ubuntu22.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3.11 \
python3-pip \
python3-venv \
python3-dev \
ffmpeg \
build-essential \
libsndfile1 \
espeak-ng \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Create and set working directory
WORKDIR /app
RUN mkdir -p /app/src/audify
# Copy project files
COPY ./audify/ /app/src/audify/
# Add uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Sync the project into a new environment, using the frozen lockfile
COPY pyproject.toml README.md uv.lock ./
# Install Python dependencies using uv
RUN uv sync
# Expose the port for the application
EXPOSE 8501
# Set the entrypoint for the container
CMD ["uv", "run", "streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]