-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 769 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 769 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
# Use Python 3.11 as base image (compatible with the project requirements)
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and setup files
COPY requirements.txt setup.py README.md ./
COPY pythaitts ./pythaitts
# Install Python dependencies
RUN pip install --no-cache-dir --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -r requirements.txt
# Install the package
RUN pip install --no-cache-dir -e .
# Copy demo script
COPY demo.py ./
# Set environment variable to avoid Python buffering
ENV PYTHONUNBUFFERED=1
# Run the demo script by default
CMD ["python", "demo.py"]