Skip to content

Commit

Permalink
Merge branch 'CIROH-UA:main' into devcon_prep
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshCu committed May 11, 2024
2 parents 84c808a + 10d7948 commit 6c4709e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 32 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker_image_main_x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ jobs:
deps:
uses: ./.github/workflows/docker_deps_image.yml
with:
runner_label: X86
runner_label: x86
secrets: inherit
troute:
needs: deps
uses: ./.github/workflows/docker_troute_image.yml
with:
runner_label: X86
runner_label: x86
secrets: inherit
ngen:
needs: troute
uses: ./.github/workflows/docker_ngen_image.yml
with:
runner_label: X86
runner_label: x86
secrets: inherit
final:
needs: ngen
Expand All @@ -32,15 +32,15 @@ jobs:
docker-auth-token: ${{ secrets.DOCKER_AUTH_TOKEN }}
image-name: "ciroh-ngen-image"
dockerfile-name: "Dockerfile"
platform: X86
platform: x86
if: ${{ !startsWith(github.ref, 'refs/heads/main') }}
- name: Build and push Docker image
uses: ./.github/action_templates/build-and-push
with:
docker-auth-token: ${{ secrets.DOCKER_AUTH_TOKEN }}
image-name: "ciroh-ngen-image"
dockerfile-name: "Dockerfile"
platform: X86
platform: x86
if: startsWith(github.ref, 'refs/heads/main')
check_result:
needs: final
Expand Down Expand Up @@ -77,4 +77,4 @@ jobs:
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
job-status: ${{ env.JOBSTATUS }}
pull_request_url: ${{ github.event.pull_request.html_url }}
head_commit_url: ${{ github.event.head_commit.url }}
head_commit_url: ${{ github.event.head_commit.url }}
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This repository contains :
- On *Windows*:
- [Install Docker Desktop on Windows](https://docs.docker.com/desktop/install/windows-install/#install-docker-desktop-on-windows)
- Once docker is installed, start Docker Destop.
- Open powershell -> right click and `Run as an Administrator`
- Open Powershell -> right click and `Run as an Administrator`
- Type `docker ps -a` to make sure docker is working.

- On *Mac*:
Expand All @@ -62,7 +62,7 @@ This repository contains :

### Download the sample input data in "ngen-data" folder from S3 bucket :

#### Linux ,Mac
#### Linux ,Mac, WSL(Windows)

```bash
mkdir -p NextGen/ngen-data
Expand All @@ -72,16 +72,6 @@ This repository contains :
# to rename your folder
mv AWI_09_004 my_data
```
#### WSL use Powershell- Run as Administrator

```bash
mkdir -p NextGen/ngen-data
cd NextGen/ngen-data
Invoke-WebRequest -Uri 'https://ciroh-ua-ngen-data.s3.us-east-2.amazonaws.com/AWI-004/AWI_09_004.tar.gz' -OutFile 'AWI_09_004.tar.gz'
tar -xf AWI_09_004.tar.gz
# to rename your folder
mv AWI_09_004 my_data
```

### How to Generate Your Own Input Data?

Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ RUN rm -rf ${BOOST_ROOT} && echo "export PATH=${PATH}" >> /etc/profile \
# chmod +x ${WORKDIR}/entrypoint.sh \
RUN for d in ${DATASET_DIRECTORIES}; do mkdir -p /dmod/datasets/${d}; done \
&& for d in iso_c_fortran_bmi noah-owp-modular topmodel cfe sloth 'evapotranspiration/evapotranspiration'; do \
if [ -d ${WORKDIR}/ngen/extern/${d}/cmake_build ]; then \
cp -a ${WORKDIR}/ngen/extern/${d}/cmake_build/*.so* /dmod/shared_libs/.; \
fi; \
if [ -d ${WORKDIR}/ngen/extern/${d}/cmake_build ]; then \
cp -a ${WORKDIR}/ngen/extern/${d}/cmake_build/*.so* /dmod/shared_libs/.; \
fi; \
done \
&& find ${WORKDIR}/ngen/extern/noah-owp-modular -type f -iname "*.TBL" -exec cp '{}' /dmod/datasets/static \; \
&& ( cp -a ${WORKDIR}/ngen/cmake_build_parallel/ngen /dmod/bin/ngen-parallel || true ) \
Expand Down
15 changes: 4 additions & 11 deletions docker/Dockerfile.ngen-deps
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ENV WORKDIR=${WORKDIR} \
NETCDF_FORTRAN_VERSION=${NETCDF_FORTRAN_VERSION} \
HYDRA_HOST_FILE=/etc/opt/hosts

COPY --from=downloads /boost ${WORKDIR}/boost
COPY --from=downloads /boost /tmp/ngen-deps
COPY --from=downloads /tmp/mpich-${MPICH_VERSION}.tar.gz /tmp/ngen-deps/mpich-${MPICH_VERSION}.tar.gz
COPY --from=downloads /tmp/hdf5-${HD5_VERSION}.tar.gz /tmp/ngen-deps/hdf5-${HD5_VERSION}.tar.gz
COPY --from=downloads /tmp/netcdf-${NETCDF_C_VERSION}.tar.gz /tmp/ngen-deps/netcdf-${NETCDF_C_VERSION}.tar.gz
Expand Down Expand Up @@ -163,15 +163,7 @@ RUN pip3 install --upgrade pip \
&& make \
&& make install \
# Install required python dependency packages with Pip \
# Except blosc2, since packaged wheels on pypi seem to have some issues, build it ourselves
&& cd /tmp/ngen-deps \
&& git clone https://github.com/Blosc/python-blosc2/ \
&& cd python-blosc2 \
# checkout a release tag
&& git checkout ${BLOSC2_VERSION} \
&& git submodule update --init --recursive \
&& python3 -m pip install -r requirements-build.txt \
&& pip3 install . \
&& pip3 install blosc2 \
&& pip3 install numpy pandas pyyaml bmipy Cython==3.0.3 netCDF4==1.6.3 wheel packaging \
&& HDF5_DIR=/usr pip3 install -v --no-build-isolation tables \
# Make aliases for convenience \
Expand All @@ -180,8 +172,9 @@ RUN pip3 install --upgrade pip \
&& alias python='python3' \
&& echo "alias python='python3'" >> /etc/profile \
# Also set up boost here, since we copied the download but only just installed bzip2 to work with it \
&& cd ${BOOST_ROOT} \
&& cd /tmp/ngen-deps \
&& tar -xjf boost_${BOOST_VERSION//./_}.tar.bz2 \
&& mv boost_${BOOST_VERSION//./_} ${BOOST_ROOT} \
&& rm boost_${BOOST_VERSION//./_}.tar.bz2 \
&& rm -rf /tmp/ngen-deps

Expand Down

0 comments on commit 6c4709e

Please sign in to comment.