Skip to content

Commit

Permalink
Builder for gdsrpy:2.0 ready
Browse files Browse the repository at this point in the history
  • Loading branch information
darribas committed May 5, 2023
1 parent 2055892 commit 7692535
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions pystack/Dockerfile
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');"

0 comments on commit 7692535

Please sign in to comment.