diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..49809a4842a444deb33c042bde6f8331c951630e --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,47 @@ +# TensorFlow GPU image as base +FROM tensorflow/tensorflow:1.15.0-gpu-py3 + +# Set environment variables +ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +ENV PATH /opt/conda/bin:$PATH + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + wget \ + git \ + libssl-dev \ + libcurl4-openssl-dev \ + libxml2-dev \ + libxt-dev \ + gdebi-core \ + && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ + /bin/bash ~/miniconda.sh -b -p /opt/conda && \ + rm ~/miniconda.sh + +# Create Conda environment and install packages +RUN conda create -y -n neuroestimator && \ + tensorflow-estimator=1.15.1 \ + r-keras=2.3.0.0 \ + r-tensorflow=2.2.0 \ + h5py=2.10.0 \ + hdf5=1.10.6 \ + r-dplyr=1.0.9 \ + r-base \ + r-remotes \ + 'r-reticulate<=1.24' && \ + +# Install RStudio Server +RUN wget wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2024.12.1-563-amd64.deb && \ + gdebi --non-interactive rstudio-server-2024.12.1-563-amd64.deb && \ + rm rstudio-server-2024.12.1-563-amd64.deb + +# Set up user for RStudio +RUN useradd -m rstudio && echo "rstudio:rstudio" | chpasswd && adduser rstudio sudo + +# Set Conda environment activation in RStudio +RUN echo "export PATH=/opt/conda/bin:$PATH" >> /etc/profile.d/conda.sh && \ + echo "source activate neuroestimator" >> /home/rstudio/.bashrc +