Skip to content
Snippets Groups Projects
Commit 24aa4682 authored by Paolo Veglio's avatar Paolo Veglio
Browse files

new docker container for CI

parent 8b816469
No related branches found
No related tags found
No related merge requests found
Pipeline #51306 failed with stages
in 10 seconds
stages:
- test
variables:
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: "tcp://docker:2375"
default:
image: python:3.10
ci:
stage: .pre
image: docker:19.03.1
tags:
- ssec_shared
before_script:
- python --version # For debugging
- pip install hatch pytest
services:
- docker:19.03.1-dind
script:
- docker login --username $CI_REGISTRY_USER --password $CI_REGISTRY_PASSWORD $CI_REGISTRY
- cd ci
- docker build --tag $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
rules:
- changes:
- ci/Dockerfile
when: always
# build:
# stage: build
# tags:
# - ssec_shared
# image: $CI_REGISTRY_IMAGE
# script:
# -
#
test:
tags:
- ssec_shared
script:
- python --version
- pip install -e .
- python setup.py build_ext --inplace
# - pip install -e .
# - python setup.py build_ext --inplace
- pytest tests/test_conf.py
- pytest tests/test_read_data.py::test_sst
- pytest tests/test_read_data.py::test_ndvi
......
FROM rockylinux/rockylinux:8
# Setup basic stuff
RUN dnf -y install epel-release
RUN dnf -y install gcc \
gcc-c++ \
wget \
bzip2 \
make \
libjpeg-turbo-devel \
zlib-devel \
libtirpc-devel \
hdf \
hdf-devel \
git
# Build szip
RUN wget https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz; \
tar zxf szip-2.1.tar.gz; \
cd szip-2.1; \
./configure --prefix=/usr/local; \
make && make install; \
cd ..; \
rm -rf /szip-2.1 /szip-2.1.tar.gz
#Build HDF-EOS2
RUN wget ftp://ftp.ssec.wisc.edu/pub/pveglio/HDFEOS/HDF-EOS2.20v1.00.tar.Z; \
tar zxf HDF-EOS2.20v1.00.tar.Z; \
cd hdfeos; \
./configure --prefix=/usr/local/ --enable-install-include CPPFLAGS=-I/usr/include/hdf --with-szip=/usr/local; \
make && make install; \
cd ..; \
rm -rf /hdfeos /HDF-EOS2.20v1.00.tar.Z
# add powertools to be able to install netcdf
RUN dnf config-manager --set-enabled powertools
RUN dnf -y install netcdf-devel
# get micromamba
RUN wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
# create env
RUN micromamba create -yn mvcm python=3.10 -c conda-forge
ARG mambaenv="/root/micromamba/envs/mvcm/bin"
# clone repo and install MVCM, then compile cython
RUN git clone https://citest:glpat-UQmZwC8KhWwtx6PyA7LJ@gitlab.ssec.wisc.edu/pveglio/mvcm.git
WORKDIR mvcm
RUN ${mambaenv}/pip install -e .
RUN ${mambaenv}/python setup.py build_ext --inplace
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment