Skip to content

Commit

Permalink
upgrade to ubuntu noble
Browse files Browse the repository at this point in the history
upgrade to Node v22 LTS
add conda-libmamba-solver archive library error workaround
pin to last miniconda release to avoid sqlite shared library not found error on gdal install
test script still not running in container
  • Loading branch information
twelch committed Dec 10, 2024
1 parent fd4ac7d commit d9d9d4b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 28 deletions.
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
# github: seasketch/docker-gp-workspace
# docker: seasketch/geoprocessing-workspace
#----------------------------------- #
ARG VARIANT="jammy"
ARG VARIANT="noble"
FROM mcr.microsoft.com/devcontainers/base:${VARIANT}

# Switch to built-in non-root gp user with sudo capabilities
USER vscode

RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list

# Install common dependencies
RUN sudo apt-get update && sudo apt-get -y upgrade \
&& sudo apt-get install -y --no-install-recommends \
Expand All @@ -27,7 +25,7 @@ RUN sudo apt-get update && sudo apt-get -y upgrade \
&& sudo rm -rf /var/lib/apt/lists/*

# Install nvm to user directory - based on https://github.com/nvm-sh/nvm and https://github.com/nvm-sh/nvm/blob/master/Dockerfile
ENV NODE_VERSION v20.12.1
ENV NODE_VERSION v22.11.0
RUN mkdir -p /home/vscode/.nvm/
RUN chown vscode:vscode -R "$HOME/.nvm"
RUN echo 'export NVM_DIR="/home/vscode/.nvm"' >> "$HOME/.bashrc"
Expand All @@ -39,11 +37,9 @@ RUN sudo curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.s
# Install platform specific dependencies
COPY installer/ /installer
RUN sudo chmod -R 755 /installer

# Setup miniconda path
ENV PATH="~/miniconda3/bin:${PATH}"
ARG PATH="~/miniconda3/bin:${PATH}"

# Run target specific tasks
ARG TARGETPLATFORM
RUN /bin/bash -c "source /installer/$TARGETPLATFORM.sh"
RUN /bin/bash -c "source /installer/$TARGETPLATFORM.sh"
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,9 @@ shell: build
/bin/bash

test:
# TODO fix https://api.travis-ci.com/v3/job/166029093/log.txt
# # Test image inheritance and multistage builds
# # Problem: Dockerfile should be FROM ???, need to build against TAG from the build step
# cd tests && docker build --tag test-gdal-base-multistage --file Dockerfile.test .
# docker run --rm \
# --volume $(shell pwd)/:/app \
# test-gdal-base-multistage \
# /app/tests/run_multistage_tests.sh
# Test GDAL CLI, etc on the base image itself
docker run --rm \
--volume $(shell pwd)/:/app \
seasketch/geoprocessing-workspace:$(TAG) \
/app/tests/run_tests.sh
bash /app/tests/run_tests.sh


7 changes: 4 additions & 3 deletions installer/linux/amd64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
# Put installer in current user home directory, install to home directory, add to user bash config, and remove installer
mkdir -p ~/miniconda \
&& cd ~/miniconda \
&& wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.7.1-0-Linux-x86_64.sh \
&& mkdir ~/.conda \
&& chmod 755 Miniconda3-latest-Linux-x86_64.sh \
&& bash Miniconda3-latest-Linux-x86_64.sh -b -p /home/vscode/miniconda3 \
&& chmod 755 Miniconda3-py312_24.7.1-0-Linux-x86_64.sh \
&& bash Miniconda3-py312_24.7.1-0-Linux-x86_64.sh -b -p /home/vscode/miniconda3 \
&& echo "Running $(conda --version)" && \
conda init bash && \
. /home/vscode/.bashrc && \
conda update conda && \
conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive && \
conda install python pip && \
conda install -c conda-forge gdal && \
cd ~ && \
Expand Down
7 changes: 4 additions & 3 deletions installer/linux/arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
# Put installer in current user home directory, install to home directory, add to user bash config, and remove installer
mkdir -p ~/miniconda \
&& cd ~/miniconda \
&& wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh \
&& wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.7.1-0-Linux-aarch64.sh \
&& mkdir ~/.conda \
&& chmod 755 Miniconda3-latest-Linux-aarch64.sh \
&& bash Miniconda3-latest-Linux-aarch64.sh -b -p /home/vscode/miniconda3 \
&& chmod 755 Miniconda3-py312_24.7.1-0-Linux-aarch64.sh \
&& bash Miniconda3-py312_24.7.1-0-Linux-aarch64.sh -b -p /home/vscode/miniconda3 \
&& echo "Running $(conda --version)" && \
conda init bash && \
. /home/vscode/.bashrc && \
conda update conda && \
conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive && \
conda install pip && \
conda install -c conda-forge gdal && \
cd ~ && \
Expand Down
8 changes: 3 additions & 5 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash

echo
# echo "proj" $(proj 2>&1 | head -n 1)
# echo "geos" $(geos-config --version)
gdalinfo --version
ogrinfo --formats | grep FlatGeobuf
python --version
# echo "node" $(node -v)
# echo "npm" $(npm -v)
python3 --version
node -v
npm -v

exit 0

0 comments on commit d9d9d4b

Please sign in to comment.