-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
40 lines (31 loc) · 911 Bytes
/
dockerfile
File metadata and controls
40 lines (31 loc) · 911 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
FROM python:3.10-slim-bullseye
# Install system dependencies in a single RUN command to reduce layers
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc \
g++ \
python3-dev \
libsndfile1 \
ffmpeg \
espeak \
build-essential \
cmake \
curl \
pkg-config \
git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy and install requirements in separate layers
COPY requirements.txt .
# Install PyTorch CPU version
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
# Install other requirements
RUN pip install --no-cache-dir -r requirements.txt
# Create directories before copying files
RUN mkdir -p Data/podcast_episodes Data/voice_Data
# Copy application files
COPY app/ app/
COPY Data/ Data/
EXPOSE 8000
CMD ["uvicorn", "app.api:app", "--host", "0.0.0.0", "--port", "8000"]