Skip to content
Snippets Groups Projects
Commit c2539ae0 authored by Fortune Iriaye's avatar Fortune Iriaye
Browse files

Update Dockerfile using R as the base image

parent e9dbd950
No related branches found
No related tags found
No related merge requests found
Pipeline #13332 passed with stage
in 15 minutes and 45 seconds
FROM tensorflow/tensorflow:1.15.0 AS tensorflow
FROM rocker/rstudio:4.3.3 AS rstudio
# Set noninteractive mode to prevent prompts during installation
ENV DEBIAN_FRONTEND=noninteractive
......@@ -31,32 +31,17 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -
ENV PATH="/opt/miniconda/bin:$PATH"
# Create .condarc file for channel priority
RUN echo "channels:\n - conda-forge\n - bioconda\n - defaults\n - r" > /root/.condarc
RUN echo "channels:\n - conda-forge\n - bioconda" > /root/.condarc
# Create Conda environment and install dependencies
RUN conda create --name neuroestimator -y \
tensorflow=1.15.0 \
tensorflow-estimator=1.15.1 \
r-keras=2.3.0.0 \
r-tensorflow=2.2.0 \
python=3.7 \
h5py=2.10.0 \
hdf5=1.10.6 \
r-dplyr=1.0.9 \
r-base \
r-remotes \
'r-reticulate<=1.24'
# Rstudio setup
FROM rocker/rstudio:4.3.3 AS rstudio
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="/opt/miniconda/bin:$PATH"
hdf5=1.10.6
# Copy Tensorflow and Miniconda environment
COPY --from=tensorflow /opt/miniconda /opt/miniconda
COPY --from=tensorflow /root/.condarc /root/.condarc
# Activate the Conda environment and install Tensorflow via Pip
RUN /bin/bash -c "source activate neuroestimator && \
pip install tensorflow==1.15.0 tensorflow-estimator==1.15.1"
# Create an Rstudio User
......@@ -68,7 +53,12 @@ RUN id -u rstudio >/dev/null 2>&1 || useradd -m -s /bin/bash rstudio && \
RUN echo 'export RSTUDIO_WHICH_R="/opt/miniconda/envs/neuroestimator/bin/R"' >> /etc/profile.d/rstudio.sh
# Install NEUROeSTIMator in the Conda environment
RUN conda run -n neuroestimator R -e "remotes::install_git('https://research-git.uiowa.edu/michaelson-lab-public/neuroestimator')"
RUN conda run -n neuroestimator Rscript -e "install.packages('remotes')"
RUN conda run -n neuroestimator Rscript -e "remotes::install_version('dplyr',version='1.0.9')"
RUN conda run -n neuroestimator Rscript -e "remotes::install_version('keras',version='2.3.0')"
RUN conda run -n neuroestimator Rscript -e "remotes::install_version('tensorflow',version='2.2.0')"
RUN conda run -n neuroestimator Rscript -e "remotes::install_version('reticulate',version='1.24')"
RUN conda run -n neuroestimator Rscript -e "remotes::install_git('https://research-git.uiowa.edu/michaelson-lab-public/neuroestimator')"
# Ensure Conda environment is activated on container start
SHELL ["/bin/bash", "-c"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment