-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ohsu-comp-bio/voice
voice image
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |