-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
19 deletions.
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 |
---|---|---|
@@ -1,29 +1,27 @@ | ||
FROM darribas/gdsr:1.0 | ||
FROM darribas/gdsr:2.0 | ||
|
||
LABEL org.label-schema.license="GPL-2.0" \ | ||
org.label-schema.vcs-url="https://github.com/gdsl-ul/gdsr" \ | ||
org.label-schema.vendor="Geographic Data Science Lab" \ | ||
maintainer="Dani Arribas-Bel <[email protected]>" | ||
|
||
# Install Miniconda | ||
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \ | ||
-O $HOME/miniconda.sh && \ | ||
sh $HOME/miniconda.sh -b -p /opt/conda && \ | ||
rm $HOME/miniconda.sh && \ | ||
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ | ||
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ | ||
echo "conda activate base" >> $HOME/.bashrc && \ | ||
find /opt/conda/ -follow -type f -name '*.a' -delete && \ | ||
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \ | ||
/opt/conda/bin/conda clean -afy | ||
# Install Mambaforge | ||
RUN wget -O Mambaforge.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh" \ | ||
&& bash Mambaforge.sh -b -p "/opt/conda" \ | ||
&& echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/rstudio/.bashrc \ | ||
&& echo ". /opt/conda/etc/profile.d/mamba.sh" >> /home/rstudio/.bashrc \ | ||
&& echo "conda activate base" >> /home/rstudio/.bashrc | ||
ENV PATH="/opt/conda/bin:${PATH}" | ||
RUN cat /home/rstudio/.bashrc | ||
USER rstudio | ||
# Install GDS env | ||
RUN . /opt/conda/etc/profile.d/conda.sh \ | ||
&& . /opt/conda/etc/profile.d/mamba.sh \ | ||
&& conda activate \ | ||
&& mamba create --name gds --file https://github.com/darribas/gds_env/raw/v9.1/gds_py/gds_py_explicit_ubuntu-latest.txt \ | ||
&& mamba activate gds \ | ||
&& pip install -r https://github.com/darribas/gds_env/raw/v9.1/gds_py/gds_py_pip.txt | ||
|
||
# Install GDS environment | ||
RUN conda env create -f https://github.com/darribas/gds_env/raw/v6.1/gds_py/gds_py.yml | ||
RUN bash -c "source /opt/conda/etc/profile.d/conda.sh && \ | ||
conda activate gds && \ | ||
pip install -r https://github.com/darribas/gds_env/raw/v6.1/gds_py/gds_py_pip.txt" | ||
EXPOSE 8888 | ||
|
||
USER root | ||
# Install reticulate | ||
RUN R -e "install.packages('reticulate', repos='https://cran.rstudio.com');" |