Repository navigation
Add hyp3-srg #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add hyp3-srg #49
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e718fbe
add action and Dockerfiles
mfangaritav cc2bd65
avoid SRG repo to build plugin
mfangaritav 75e901d
avoid SRG repo to build plugin
mfangaritav 66c5c6b
update Dockerfile for GPU
mfangaritav 6dec4d9
ruff and mypy
mfangaritav ea26789
ruff and mypy
mfangaritav 2c908d3
ruff and mypy
mfangaritav 5e26501
ruff and mypy
mfangaritav b798d31
readme
mfangaritav ebfe340
changelog
mfangaritav 221d3f3
add permission build script
mfangaritav 2a68094
Merge branch 'develop' into hyp3-srg
mfangaritav ae77d10
add suggestions
mfangaritav 5d78a54
update actions
mfangaritav e42cee0
Fix spelling of 'Hyp3' in README.md
jhkennedy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Test and build | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
| tags: | ||
| - 'v*' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - develop | ||
|
|
||
| jobs: | ||
| call-pytest-workflow: | ||
| # Docs: https://github.com/ASFHyP3/actions | ||
| uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.22.1 | ||
| permissions: | ||
| contents: read | ||
| with: | ||
| local_package_name: srg | ||
| python_versions: >- | ||
| ["3.10", "3.11", "3.12", "3.13"] | ||
|
|
||
| call-version-info-workflow: | ||
| # Docs: https://github.com/ASFHyP3/actions | ||
| uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.22.1 | ||
| permissions: | ||
| contents: read | ||
| with: | ||
| python_version: "3.12" | ||
|
|
||
| call-docker-ghcr-workflow: | ||
| needs: call-version-info-workflow | ||
| # Docs: https://github.com/ASFHyP3/actions | ||
| uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.22.1 | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| with: | ||
| version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }} | ||
| user: tools-bot | ||
| file: Dockerfile.gpu | ||
| provenance: true | ||
| platforms: '' | ||
| build_args: '' | ||
| secrets: | ||
| USER_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| FROM condaforge/mambaforge:latest as builder | ||
|
|
||
| ENV USEGPU=false | ||
| ENV FFTW_LIB=/usr/lib/x86_64-linux-gnu/libfftw3f.a | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends unzip vim curl git build-essential gfortran libfftw3-dev && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY . /srg/ | ||
| COPY ./scripts/build_proc.sh /srg/ | ||
| RUN chmod +x /srg/build_proc.sh | ||
| RUN cd /srg && ./build_proc.sh && cd / | ||
|
|
||
| FROM condaforge/mambaforge:latest as runner | ||
|
|
||
| # For opencontainers label definitions, see: | ||
| # https://github.com/opencontainers/image-spec/blob/master/annotations.md | ||
| LABEL org.opencontainers.image.title="HyP3 SRG" | ||
| LABEL org.opencontainers.image.description="HyP3 plugin for Stanford Radar Group SAR processing" | ||
| LABEL org.opencontainers.image.vendor="Alaska Satellite Facility" | ||
| LABEL org.opencontainers.image.authors="ASF Tools Team <UAF-asf-apd@alaska.edu>" | ||
| LABEL org.opencontainers.image.licenses="BSD-3-Clause" | ||
| LABEL org.opencontainers.image.url="https://github.com/ASFHyP3/srg" | ||
| LABEL org.opencontainers.image.source="https://github.com/ASFHyP3/srg" | ||
| LABEL org.opencontainers.image.documentation="https://hyp3-docs.asf.alaska.edu" | ||
|
|
||
| ARG CONDA_UID=1000 | ||
| ARG CONDA_GID=1000 | ||
|
|
||
| ENV PYTHONDONTWRITEBYTECODE=true | ||
| ENV MYHOME=/home/conda | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends unzip vim curl gfortran && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN groupadd -g "${CONDA_GID}" --system conda && \ | ||
| useradd -l -u "${CONDA_UID}" -g "${CONDA_GID}" --system -d /home/conda -m -s /bin/bash conda && \ | ||
| chown -R conda:conda /opt && \ | ||
| echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/conda/.profile && \ | ||
| echo "conda activate base" >> /home/conda/.profile | ||
|
|
||
| SHELL ["/bin/bash", "-l", "-c"] | ||
|
|
||
| USER ${CONDA_UID} | ||
| WORKDIR /home/conda/ | ||
|
|
||
|
|
||
| COPY --chown=${CONDA_UID}:${CONDA_GID} --from=builder /srg/snaphu_v2.0b0.0.0/bin/snaphu /srg/bin/snaphu | ||
| COPY --chown=${CONDA_UID}:${CONDA_GID} --from=builder /srg /srg | ||
|
|
||
| RUN mamba env create -f /srg/environment.yml && \ | ||
| conda clean -afy && \ | ||
| conda activate srg && \ | ||
| sed -i 's/conda activate base/conda activate srg/g' /home/conda/.profile && \ | ||
| python -m pip install --no-cache-dir /srg | ||
|
|
||
| ENTRYPOINT ["/srg/src/srg/etc/entrypoint.sh"] | ||
| CMD ["-h"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| FROM nvidia/cuda:12.4.1-devel-ubuntu22.04 AS builder | ||
|
|
||
| # FIXME: should be able to find this dynamically | ||
| ARG GPU_ARCH=89 | ||
|
|
||
| # GPU_ARCH and USEGPU environment variable used by build_proc.sh | ||
| ENV FFTW_LIB=/usr/lib/x86_64-linux-gnu/libfftw3f.a | ||
| ENV GPU_ARCH=${GPU_ARCH} | ||
| ENV USEGPU=true | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends unzip vim curl git build-essential gfortran libfftw3-dev && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY . /srg/ | ||
| COPY ./scripts/build_proc.sh /srg/ | ||
| RUN chmod +x /srg/build_proc.sh | ||
| RUN cd /srg && ./build_proc.sh && cd / | ||
|
|
||
| FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04 AS runner | ||
|
|
||
| # For opencontainers label definitions, see: | ||
| # https://github.com/opencontainers/image-spec/blob/master/annotations.md | ||
| LABEL org.opencontainers.image.title="SRG" | ||
| LABEL org.opencontainers.image.description="HyP3 plugin for Stanford Radar Group Processor SAR processing" | ||
| LABEL org.opencontainers.image.vendor="Alaska Satellite Facility" | ||
| LABEL org.opencontainers.image.authors="ASF Tools Team <UAF-asf-apd@alaska.edu>" | ||
| LABEL org.opencontainers.image.licenses="BSD-3-Clause" | ||
| LABEL org.opencontainers.image.url="https://github.com/ASFHyP3/srg" | ||
| LABEL org.opencontainers.image.source="https://github.com/ASFHyP3/srg" | ||
| LABEL org.opencontainers.image.documentation="https://hyp3-docs.asf.alaska.edu" | ||
|
|
||
| ARG CONDA_UID=1000 | ||
| ARG CONDA_GID=1000 | ||
| ARG MINIFORGE_NAME=Miniforge3 | ||
| ARG MINIFORGE_VERSION=24.3.0-0 | ||
|
|
||
| ENV CONDA_DIR=/opt/conda | ||
| ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 | ||
| ENV PATH=${CONDA_DIR}/bin:${PATH} | ||
| ENV PYTHONDONTWRITEBYTECODE=true | ||
| ENV PROC_HOME=/srg | ||
| ENV MYHOME=/home/conda | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # Conda setup | ||
| RUN apt-get update && apt-get install --no-install-recommends --yes wget bzip2 ca-certificates git > /dev/null && \ | ||
| wget --no-hsts --quiet https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/${MINIFORGE_NAME}-${MINIFORGE_VERSION}-Linux-$(uname -m).sh -O /tmp/miniforge.sh && \ | ||
| /bin/bash /tmp/miniforge.sh -b -p ${CONDA_DIR} && \ | ||
| rm /tmp/miniforge.sh && \ | ||
| conda clean --tarballs --index-cache --packages --yes && \ | ||
| find ${CONDA_DIR} -follow -type f -name '*.a' -delete && \ | ||
| find ${CONDA_DIR} -follow -type f -name '*.pyc' -delete && \ | ||
| conda clean --force-pkgs-dirs --all --yes && \ | ||
| echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate base" >> /etc/skel/.bashrc && \ | ||
| echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate base" >> ~/.bashrc | ||
|
|
||
| RUN apt-get install -y --no-install-recommends unzip vim curl gfortran && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN groupadd -g "${CONDA_GID}" --system conda && \ | ||
| useradd -l -u "${CONDA_UID}" -g "${CONDA_GID}" --system -d /home/conda -m -s /bin/bash conda && \ | ||
| chown -R conda:conda /opt && \ | ||
| echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/conda/.profile && \ | ||
| echo "conda activate base" >> /home/conda/.profile | ||
|
|
||
| SHELL ["/bin/bash", "-l", "-c"] | ||
|
|
||
| USER ${CONDA_UID} | ||
| WORKDIR /home/conda/ | ||
|
|
||
| COPY --chown=${CONDA_UID}:${CONDA_GID} --from=builder /srg/snaphu_v2.0b0.0.0/bin/snaphu /srg/bin/snaphu | ||
| COPY --chown=${CONDA_UID}:${CONDA_GID} --from=builder /srg /srg | ||
|
|
||
| RUN mamba env create -f /srg/environment.yml && \ | ||
| conda clean -afy && \ | ||
| conda activate srg && \ | ||
| sed -i 's/conda activate base/conda activate srg/g' /home/conda/.profile && \ | ||
| python -m pip install --no-cache-dir /srg | ||
|
|
||
| ENTRYPOINT ["/srg/src/srg/etc/entrypoint.sh"] | ||
| CMD ["-h"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.