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

Update Dockerfile

parent 228796f5
No related branches found
No related tags found
No related merge requests found
Pipeline #13310 passed with stage
in 20 minutes and 31 seconds
# Ubuntu image as base
FROM ubuntu:18.04
FROM ubuntu:22.04
# Set environment variables
# Set noninteractive mode to prevent prompts during installation
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
# Install required system dependencies
RUN apt-get update && apt-get install -y \
wget \
sudo \
curl \
git \
libssl-dev \
build-essential \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libxt-dev \
pandoc \
libclang-dev \
libpq-dev \
libgit2-dev \
gdebi-core \
psmisc \
&& rm -rf /var/lib/apt/lists/*
# Create an RStudio user with sudo access
RUN useradd -m -s /bin/bash rstudio && echo "rstudio:rstudio" | chpasswd && \
usermod -aG sudo rstudio
# Set working directory
WORKDIR /root
......@@ -31,6 +42,7 @@ RUN echo "channels:\n - conda-forge\n - bioconda\n - defaults\n - r" > /root
# Create Conda environment and install dependencies
RUN conda create --name neuroestimator -y \
r-essentials \
tensorflow=1.15.0 \
tensorflow-estimator=1.15.1 \
r-keras=2.3.0.0 \
......@@ -42,9 +54,22 @@ RUN conda create --name neuroestimator -y \
r-remotes \
'r-reticulate<=1.24'
# Activate environment and install NEUROeSTIMator
RUN /bin/bash -c "source activate neuroestimator && \
R -e 'remotes::install_git(\"https://research-git.uiowa.edu/michaelson-lab-public/neuroestimator\")'"
# Install RStudio Server
RUN wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2024.12.1-563-amd64.deb -O rstudio-server.deb && \
dpkg -i rstudio-server.deb || apt-get -f install -y && \
rm rstudio-server.deb
# Ensure RStudio uses Conda's R
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')"
# Ensure Conda environment is activated on container start
SHELL ["/bin/bash", "-c"]
# Expose RStudio Server port
EXPOSE 8787
# Set entrypoint to bash
ENTRYPOINT ["/bin/bash"]
# Set the entrypoint to start RStudio Server
ENTRYPOINT ["/bin/bash", "-c", "source activate neuroestimator && /usr/lib/rstudio-server/bin/rserver --server-daemonize=0"]
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