Skip to content

Commit

Permalink
Merge pull request #6 from ohsu-comp-bio/voice
Browse files Browse the repository at this point in the history
voice image
  • Loading branch information
quinnwai authored Apr 17, 2024
2 parents e181597 + 859e947 commit 22b34b6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions voice/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# use base image
FROM quay.io/ohsu-comp-bio/bridge2ai-jupyter:restricted-gpu-root

# return to non-root user
USER $NB_UID
WORKDIR /home/$NB_USER

# create environment
# setup environment
RUN conda create -n voice
SHELL ["conda", "run", "-n", "voice", "/bin/bash", "-c"]
RUN conda install python=3.11
RUN pip install --no-cache-dir b2aiprep ipympl huggingface_hub[cli]
RUN pip install ipykernel
RUN python -m ipykernel install --user --name voice --display-name "Python (voice)"

# download models
RUN MODEL_DIR=$HOME/models && \
huggingface-cli download --local-dir $MODEL_DIR/speechbrain/spkrec-ecapa-voxceleb speechbrain/spkrec-ecapa-voxceleb --cache-dir ${MODEL_DIR}/cache && \
huggingface-cli download --local-dir $MODEL_DIR/openai/whisper-base openai/whisper-base --cache-dir ${MODEL_DIR}/cache

# allow use of conda envs
RUN conda init bash && exec bash
3 changes: 3 additions & 0 deletions voice/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Voice

Docker file for Voice. Builds off `restricted-gpu-root` image, reverting use back to non-root privileges. Installs relevant packages into `voice` conda environment and downloads `speechbrain/spkrec-ecapa-voxceleb ` and `openai/whisper-base` models from HuggingFace.

0 comments on commit 22b34b6

Please sign in to comment.