Skip to content

Commit

Permalink
Add pipeline to preload models.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Jul 19, 2024
1 parent a5301fe commit c3bccf1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
CACHE_SPEC: "type=registry,ref=${{ env.DOCKER_REPO }}:${{ env.INFER_HW }}-${{ env.GIT_BRANCH }}-buildcache"
with:
context: .
file: ./docker/Dockerfile
file: ./docker/Dockerfile.redder
push: true
build-args: |
BASE_IMAGE=${{ env.BASE_IMAGE }}
Expand Down
12 changes: 12 additions & 0 deletions docker/Dockerfile.redder
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# syntax=docker/dockerfile:1.7-labs

ARG BASE_IMAGE=sippylabs/infernos:latest
FROM $BASE_IMAGE AS build
LABEL maintainer="Maksym Sobolyev <[email protected]>"

USER root

COPY docker/preload_models.sh docker/preload_it_de.yaml /tmp
WORKDIR /tmp
RUN ./preload_models.sh
WORKDIR /Infernos
7 changes: 7 additions & 0 deletions docker/preload_it_de.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apps:
live_translator:
profiles:
configuration1:
stt_langs: ['de', 'it']
tts_langs: ['it', 'de']
live_translator_precache: true
9 changes: 9 additions & 0 deletions docker/preload_models.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -e
set -x

find / -name libgomp.so.1
find / -name libmkl_intel_lp64.so.2
${CONDA_ACTIVATE}
LD_LIBRARY_PATH=/opt/conda/lib ${PYTHON_CMD} /Infernos/Infernos.py -f preload_it_de.yaml

0 comments on commit c3bccf1

Please sign in to comment.