diff --git a/images/Dockerfile.gpu b/images/Dockerfile.gpu index b5eb254..2623353 100644 --- a/images/Dockerfile.gpu +++ b/images/Dockerfile.gpu @@ -1,51 +1,35 @@ -FROM docker.io/rocker/ml +FROM quay.io/jupyter/pytorch-notebook:cuda12-ubuntu-24.04 -ENV NB_USER rstudio -ENV VIRTUAL_ENV /opt/venv -ENV PATH ${VIRTUAL_ENV}/bin:$PATH +COPY jupyter-ai.yml environment.yml +RUN conda update -n base -c conda-forge conda && \ + conda env update --file environment.yml -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} +USER root +RUN curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz && tar -C /usr -xzf ollama-linux-amd64.tgz -RUN /rocker_scripts/experimental/install_dev_osgeo.sh -RUN chown -R ${NB_USER}:staff ${VIRTUAL_ENV} && chmod -R g+rw ${VIRTUAL_ENV} +RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache +RUN git config --system pull.rebase false && \ + echo '"\e[5~": history-search-backward' >> /etc/inputrc && \ + echo '"\e[6~": history-search-forward' >> /etc/inputrc + +#git config --system credential.helper 'cache --timeout=30000' && \ -COPY apt.txt apt.txt -RUN apt-get update -qq && xargs sudo apt-get -y install < apt.txt +RUN apt-get update -qq && apt-get -y install vim git-lfs # 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 # ollama RUN curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz && tar -C /usr -xzf ollama-linux-amd64.tgz - -# 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 -COPY rl-requirements.txt /tmp/rl-requirements.txt -RUN python3 -m pip install --no-cache-dir -r /tmp/rl-requirements.txt -COPY jupyter-requirements.txt /tmp/jupyter-requirements.txt -RUN python3 -m pip install --no-cache-dir -r /tmp/jupyter-requirements.txt - -## Register the environment with ipykernel, mostly for vscode to find it -RUN python3 -m ipykernel install --user --name=venv +COPY spatial-env.yml spatial-env.yml +RUN conda update -n base -c conda-forge conda && \ + conda env update --file spatial-env.yml +COPY rl-env.yml rl-env.yml +RUN conda update -n base -c conda-forge conda && \ + conda env update --file rl-env.yml -#USER root -#COPY install.R /tmp/install.R -#RUN Rscript /tmp/install.R && rm /tmp/install.R && chown -R ${NB_USER}:staff ${R_HOME}/site-library -#USER ${NB_USER} diff --git a/images/jupyter-ai.yml b/images/jupyter-ai.yml index 2e476dc..da4f940 100644 --- a/images/jupyter-ai.yml +++ b/images/jupyter-ai.yml @@ -2,12 +2,14 @@ name: base channels: - conda-forge dependencies: + - ibis-duckdb - jupyterlab-myst - jupyter-ai - jupyter-resource-usage - jupyter-vscode-proxy - pypdf - pip + - seaborn - pip: - jupyter-tensorboard-proxy diff --git a/images/rl-env.yml b/images/rl-env.yml new file mode 100644 index 0000000..52a9be6 --- /dev/null +++ b/images/rl-env.yml @@ -0,0 +1,20 @@ +name: base +channels: + - conda-forge +dependencies: + - darts + - gymnasium + - gputil + - huggingface_hub + - nox + - nvitop + - plotnine + - PyYaml + - pytest + - stable-baselines3 + - sb3-contrib + - scikit-optimize + - pip: + - ray[rllib,tune] + - huggingface_sb3 + diff --git a/images/spatial-env.yml b/images/spatial-env.yml new file mode 100644 index 0000000..d104af8 --- /dev/null +++ b/images/spatial-env.yml @@ -0,0 +1,38 @@ +name: base +channels: + - conda-forge +dependencies: + - awscliv2 + - distributed + - earthaccess + - fiona + - fsspec + - geopandas + - geocube + - leafmap[maplibregl] + - localtileserver + - mapclassify + - maplibre + - minio + - netCDF4 + - odc-geo + - odc-stac + - planetary-computer + - pmtiles + - polars + - pyarrow + - pydeck + - pyogrio + - pystac + - pystac-client + - rasterio + - rasterstats + - requests + - rio-cogeo + - rioxarray + - stackstac + - streamlit + - tqdm + - xarray + - zarr +