Skip to content

Commit

Permalink
fix(pipeline): make toolbox available for airflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Helms authored and Andreas Helms committed May 30, 2024
1 parent fe647f0 commit 967642b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
17 changes: 9 additions & 8 deletions pipeline/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,23 @@ RUN apt update && apt install -y nodejs
RUN apt update && apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
RUN npm install -g canvas

# CCI Toolbox

ADD initialize-conda.sh /home/airflow/initialize-conda.sh
RUN ls -l ~
RUN chmod +x /home/airflow/initialize-conda.sh

USER airflow

# conda
RUN mkdir -p ~/miniconda3
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O ~/miniconda3/miniconda.sh
RUN bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
RUN rm -rf ~/miniconda3/miniconda.sh

ENV PATH="${PATH}:~/miniconda3/bin"


# CCI Toolbox

ADD initialize-conda.sh /root/initialize-conda.sh
RUN ls -l ~
RUN chmod +x ~/initialize-conda.sh
RUN bash ~/initialize-conda.sh

USER airflow

# xarray
RUN pip install xarray netcdf4 h5netcdf
7 changes: 4 additions & 3 deletions pipeline/initialize-conda.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

~/miniconda3/bin/conda init bash
conda init bash

source ~/.bashrc

conda create -y --name ect --channel conda-forge esa-climate-toolbox
conda create -y --name ect --channel conda-forge esa-climate-toolbox
conda info --envs

conda activate ect
echo 'source activate ect' >> ~/.bashrc

0 comments on commit 967642b

Please sign in to comment.