adjust dependencies and dockerfiles
This commit is contained in:
+12
-5
@@ -1,21 +1,28 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Install system dependencies
|
||||
# Install system dependencies #TODO: no git or gcc should be needed inside container -or just uninstall later - just provide a pre build lc3 package from a inhouse pip source
|
||||
RUN apt-get update && apt-get install -y \
|
||||
liblc3-tools \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
git gcc
|
||||
# liblc3-tools \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy project files
|
||||
COPY . .
|
||||
|
||||
# accept new ssh server
|
||||
RUN sed /^StrictHostKeyChecking/d /etc/ssh/ssh_config; \
|
||||
echo StrictHostKeyChecking no >> /etc/ssh/ssh_config
|
||||
|
||||
# Install Python dependencies
|
||||
RUN --mount=type=cache,target=/root/.cache pip install --no-cache-dir .
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=ssh,required=true \
|
||||
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
|
||||
|
||||
|
||||
+10
-2
@@ -3,10 +3,18 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ssh:
|
||||
- default=~/.ssh/id_ed25519 #lappi
|
||||
ports:
|
||||
- "7999:7999"
|
||||
environment:
|
||||
- PYTHONUNBUFFERED=1
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- translator-network
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
|
||||
+2
-1
@@ -11,7 +11,8 @@ dependencies = [
|
||||
"requests==2.32.3",
|
||||
"aiohttp==3.9.3",
|
||||
"piper-tts==1.2.0",
|
||||
"librosa==0.10.1"
|
||||
"librosa==0.10.1",
|
||||
"lc3 @ git+ssh://git@ssh.pstruebi.xyz:222/auracaster/liblc3.git@7558637303106c7ea971e7bb8cedf379d3e08bcc",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
Reference in New Issue
Block a user