Skip to content

Commit

Permalink
image slimming and gen3 data pull functionality (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnwai authored Apr 18, 2024
1 parent 4943a8d commit 430693c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
15 changes: 13 additions & 2 deletions ai-readi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# use base image
FROM quay.io/ohsu-comp-bio/bridge2ai-jupyter:restricted-gpu-root
FROM quay.io/ohsu-comp-bio/bridge2ai-jupyter:cpu-root

# return to non-root user
USER $NB_UID
Expand Down Expand Up @@ -30,7 +30,18 @@ RUN git clone https://github.com/rmaphoh/AutoMorph.git && \
pip install -r requirement.txt && \
pip install efficientnet_pytorch

# add g3t
SHELL ["conda", "run", "-n", "base", "/bin/bash", "-c"]
RUN pip install --upgrade pip
RUN pip install gen3-tracker \
&& pip install -U gen3-tracker

# allow use of conda envs
RUN conda init bash && exec bash

# USER root
# add gen3-client
RUN wget https://github.com/ACED-IDP/cdis-data-client/releases/latest/download/gen3-client-linux-amd64.zip \
&& unzip gen3-client-linux-amd64.zip \
&& mkdir ~/.gen3 \
&& echo 'export PATH=$PATH:~/.gen3' >> ~/.bashrc \
&& source ~/.bashrc
18 changes: 16 additions & 2 deletions cm4ai/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# use base image
FROM quay.io/ohsu-comp-bio/bridge2ai-jupyter:restricted-gpu-root
FROM quay.io/ohsu-comp-bio/bridge2ai-jupyter:cpu-root

# return to non-root user
USER $NB_UID
Expand All @@ -17,4 +17,18 @@ RUN cd b2ai-f2f/cellmaps_pipeline \
&& make dist \
&& pip install dist/cellmaps_pipeline*whl

RUN conda init bash && exec bash
# add g3t
SHELL ["conda", "run", "-n", "base", "/bin/bash", "-c"]
RUN pip install --upgrade pip
RUN pip install gen3-tracker \
&& pip install -U gen3-tracker

# allow use of conda envs
RUN conda init bash && exec bash

# add gen3-client
RUN wget https://github.com/ACED-IDP/cdis-data-client/releases/latest/download/gen3-client-linux-amd64.zip \
&& unzip gen3-client-linux-amd64.zip \
&& mkdir ~/.gen3 \
&& echo 'export PATH=$PATH:~/.gen3' >> ~/.bashrc \
&& source ~/.bashrc
24 changes: 24 additions & 0 deletions voice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
# use base image
FROM quay.io/ohsu-comp-bio/bridge2ai-jupyter:cpu-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

# add g3t
SHELL ["conda", "run", "-n", "base", "/bin/bash", "-c"]
RUN pip install --upgrade pip
RUN pip install gen3-tracker \
&& pip install -U gen3-tracker

# allow use of conda envs
RUN conda init bash && exec bash

# add gen3-client
RUN wget https://github.com/ACED-IDP/cdis-data-client/releases/latest/download/gen3-client-linux-amd64.zip \
&& unzip gen3-client-linux-amd64.zip \
&& mkdir ~/.gen3 \
&& echo 'export PATH=$PATH:~/.gen3' >> ~/.bashrc \
&& source ~/.bashrc

0 comments on commit 430693c

Please sign in to comment.