-
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 #4 from ohsu-comp-bio/ai-readi
AI-READi
- Loading branch information
Showing
6 changed files
with
101 additions
and
1 deletion.
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,36 @@ | ||
# 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 image from requirements.txt | ||
RUN conda create --name ai-readi | ||
SHELL ["conda", "run", "-n", "ai-readi", "/bin/bash", "-c"] | ||
COPY --chown=$NB_USER:$NB_GID requirements.txt . | ||
RUN pip install -r requirements.txt && \ | ||
rm requirements.txt | ||
|
||
# setup retfound | ||
RUN conda create -n retfound python=3.7.5 -y | ||
SHELL ["conda", "run", "-n", "retfound", "/bin/bash", "-c"] | ||
RUN git clone https://github.com/rmaphoh/RETFound_MAE/ && \ | ||
cd RETFound_MAE && \ | ||
pip install -r requirement.txt && \ | ||
cd $HOME | ||
|
||
# setup automorph | ||
RUN conda create -n automorph python=3.6 -y | ||
SHELL ["conda", "run", "-n", "automorph", "/bin/bash", "-c"] | ||
RUN git clone https://github.com/rmaphoh/AutoMorph.git && \ | ||
cd AutoMorph && \ | ||
conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.1 -c pytorch -y && \ | ||
pip install --ignore-installed certifi && \ | ||
pip install -r requirement.txt && \ | ||
pip install efficientnet_pytorch | ||
|
||
# allow use of conda envs | ||
RUN conda init bash && exec bash | ||
|
||
# USER root |
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 @@ | ||
# AI-READi | ||
|
||
Docker file for AI-READi. Builds off `restricted-gpu-root` image, reverting use back to non-root privileges. Creates environment with requirements.txt, a retfound environment, and a Automorph envrionment. |
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,38 @@ | ||
appnope==0.1.4 | ||
asttokens==2.4.1 | ||
comm==0.2.2 | ||
contourpy==1.2.1 | ||
cycler==0.12.1 | ||
debugpy==1.8.1 | ||
decorator==5.1.1 | ||
executing==2.0.1 | ||
fonttools==4.50.0 | ||
ipykernel==6.29.4 | ||
ipython==8.23.0 | ||
jedi==0.19.1 | ||
jupyter_client==8.6.1 | ||
jupyter_core==5.7.2 | ||
kiwisolver==1.4.5 | ||
matplotlib==3.8.3 | ||
matplotlib-inline==0.1.6 | ||
nest-asyncio==1.6.0 | ||
numpy==1.26.4 | ||
packaging==24.0 | ||
parso==0.8.3 | ||
pexpect==4.9.0 | ||
pillow==10.3.0 | ||
platformdirs==4.2.0 | ||
prompt-toolkit==3.0.43 | ||
psutil==5.9.8 | ||
ptyprocess==0.7.0 | ||
pure-eval==0.2.2 | ||
pydicom==2.4.4 | ||
Pygments==2.17.2 | ||
pyparsing==3.1.2 | ||
python-dateutil==2.9.0.post0 | ||
pyzmq==25.1.2 | ||
six==1.16.0 | ||
stack-data==0.6.3 | ||
tornado==6.4 | ||
traitlets==5.14.2 | ||
wcwidth==0.2.13 |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Restricted CPU Root | ||
|
||
Dockerfile containing the Jupyter Notebooks for the Bridge2AI project, adapted from the [restricted-gpu-slim/Dockerfile](https://github.com/uc-cdis/containers/blob/master/jupyter-slim/Dockerfile) from Center for Translational Data Science at University of Chicago. No GPU features are enabled in this Dockerfile but root access is provided, making this a suitable image for building off of. | ||
Dockerfile containing the Jupyter Notebooks for the Bridge2AI project, adapted from the [restricted-gpu-slim/Dockerfile](https://github.com/uc-cdis/containers/blob/master/jupyter-slim/Dockerfile) from Center for Translational Data Science at University of Chicago. Briefly, it provides a VM with a Jupyter Notebooks server and restrictions on downloads (disabled access to download buttons). No GPU features are enabled in this Dockerfile but root access is provided, making this a suitable image for building off of. |
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,20 @@ | ||
# use base image | ||
FROM quay.io/ohsu-comp-bio/bridge2ai-jupyter:cpu-root | ||
|
||
RUN sudo apt update | ||
|
||
# setup CUDA | ||
RUN sudo apt-get install -y kmod \ | ||
&& wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \ | ||
&& sudo bash cuda_11.8.0_520.61.05_linux.run --silent --toolkit | ||
|
||
# setup cuDNN | ||
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \ | ||
&& sudo dpkg -i cuda-keyring_1.1-1_all.deb \ | ||
&& sudo apt-get update \ | ||
&& sudo apt-get -y install cudnn \ | ||
&& echo 'export PATH=$PATH:/usr/local/cuda-11.8/bin' > ~/.bashrc \ | ||
&& echo 'export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib6:$LD_LIBRARY_PATH' >> ~/.bashrc \ | ||
&& source ~/.bashrc | ||
|
||
RUN rm cuda_11.8.0_520.61.05_linux.run cuda-keyring_1.1-1_all.deb |
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 @@ | ||
# Restricted GPU | ||
|
||
Builds on top of the `restricted-cpu-root` image. Provides GPU setup with CUDA and CuDNN. Tested on AWS GPU P3 instance (Tesla V100 GPUs). See Dockerfile for more details. |