24 lines
570 B
Docker
24 lines
570 B
Docker
FROM python:3.11-slim
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
liblc3-tools \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy project files
|
|
COPY . .
|
|
|
|
# Install Python dependencies
|
|
RUN --mount=type=cache,target=/root/.cache pip install --no-cache-dir .
|
|
# dependencies for running piper on gpu
|
|
RUN --mount=type=cache,target=/root/.cache pip install --no-cache-dir onnxruntime-gpu
|
|
|
|
|
|
# Expose the API port
|
|
EXPOSE 7999
|
|
|
|
# Run the translator server
|
|
CMD ["python", "-m", "multilang_translator.translator_server.translator_server"]
|