From b82800d1db0d3f42fa353d3588ff7e12042d65c2 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 20 Jun 2024 14:31:04 -0700 Subject: [PATCH] bugfix --- images/Dockerfile.gpu | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/images/Dockerfile.gpu b/images/Dockerfile.gpu index e626e76..874a1a9 100644 --- a/images/Dockerfile.gpu +++ b/images/Dockerfile.gpu @@ -1,4 +1,38 @@ -FROM zcr.thelio.carlboettiger.info/boettiger-lab/k8s-spatial +FROM docker.io/rocker/ml + +ENV NB_USER rstudio +ENV VIRTUAL_ENV /opt/venv +ENV PATH ${VIRTUAL_ENV}/bin:$PATH + +RUN /rocker_scripts/install_jupyter.sh +RUN python3 -m pip install numpy +RUN chown -R ${NB_USER}:staff ${VIRTUAL_ENV} && chmod -R g+rw ${VIRTUAL_ENV} + +RUN /rocker_scripts/experimental/install_dev_osgeo.sh + +COPY apt.txt apt.txt +RUN apt-get update -qq && xargs sudo apt-get -y install < apt.txt + +# install codeserver +#RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache +RUN wget https://github.com/coder/code-server/releases/download/v4.89.1/code-server_4.89.1_amd64.deb && dpkg -i code-server*.deb && rm code-server*.deb + +# some preferences +RUN git config --system pull.rebase false && \ + git config --system credential.helper 'cache --timeout=30000' && \ + echo '"\e[5~": history-search-backward' >> /etc/inputrc && \ + echo '"\e[6~": history-search-forward' >> /etc/inputrc + +USER ${NB_USER} +WORKDIR /home/${NB_USER} + +RUN usermod -s /bin/bash ${NB_USER} +COPY spatial-requirements.txt /tmp/spatial-requirements.txt +RUN python3 -m pip install --no-cache-dir -r /tmp/spatial-requirements.txt + +## Register the environment with ipykernel, mostly for vscode to find it +RUN python3 -m ipykernel install --user --name=venv + COPY rl-requirements.txt /tmp/rl-requirements.txt RUN python3 -m pip install --no-cache-dir -r /tmp/rl-requirements.txt