-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from ASFHyP3/develop
Release v0.4.0
- Loading branch information
Showing
8 changed files
with
207 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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 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 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,86 @@ | ||
FROM nvidia/cuda:12.4.1-devel-ubuntu20.04 | ||
|
||
# For opencontainers label definitions, see: | ||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md | ||
LABEL org.opencontainers.image.title="HyP3 back-projection" | ||
LABEL org.opencontainers.image.description="HyP3 plugin for back-projection processing" | ||
LABEL org.opencontainers.image.vendor="Alaska Satellite Facility" | ||
LABEL org.opencontainers.image.authors="ASF Tools Team <[email protected]>" | ||
LABEL org.opencontainers.image.licenses="BSD-3-Clause" | ||
LABEL org.opencontainers.image.url="https://github.com/ASFHyP3/hyp3-back-projection" | ||
LABEL org.opencontainers.image.source="https://github.com/ASFHyP3/hyp3-back-projection" | ||
LABEL org.opencontainers.image.documentation="https://hyp3-docs.asf.alaska.edu" | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG CONDA_UID=1000 | ||
ARG CONDA_GID=1000 | ||
ARG BACK_PROJECTION_TAG=0.2.0 | ||
ARG FFTW_TAG=3.3.9 | ||
ARG MINIFORGE_NAME=Miniforge3 | ||
ARG MINIFORGE_VERSION=24.3.0-0 | ||
|
||
# USEGPU environment variable used by build_proc.sh | ||
ENV USEGPU="true" | ||
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=/home/conda/back-projection | ||
ENV MYHOME=/home/conda | ||
|
||
# Conda setup | ||
RUN apt-get update > /dev/null && \ | ||
apt-get install --no-install-recommends --yes \ | ||
wget bzip2 ca-certificates \ | ||
git \ | ||
tini \ | ||
> /dev/null && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
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 update && apt-get install -y --no-install-recommends unzip vim curl build-essential gfortran libfftw3-dev && \ | ||
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/ | ||
|
||
RUN curl -sL https://github.com/ASFHyP3/back-projection/archive/refs/tags/v${BACK_PROJECTION_TAG}.tar.gz > ./back-projection.tar.gz && \ | ||
mkdir -p ./back-projection && \ | ||
tar -xvf ./back-projection.tar.gz -C ./back-projection/ --strip=1 && \ | ||
rm ./back-projection.tar.gz && \ | ||
rm -rf ./back-projection/fft | ||
|
||
COPY --chown=${CONDA_UID}:${CONDA_GID} ./scripts/build_proc.sh ./back-projection | ||
RUN cd /home/conda/back-projection && \ | ||
chmod +x ./build_proc.sh && \ | ||
./build_proc.sh && \ | ||
find $PROC_HOME -type f -name "*.py" -exec chmod +x {} + && \ | ||
cd /home/conda/ | ||
|
||
COPY --chown=${CONDA_UID}:${CONDA_GID} . /hyp3-back-projection/ | ||
|
||
RUN mamba env create -f /hyp3-back-projection/environment.yml && \ | ||
conda clean -afy && \ | ||
conda activate hyp3-back-projection && \ | ||
sed -i 's/conda activate base/conda activate hyp3-back-projection/g' /home/conda/.profile && \ | ||
python -m pip install --no-cache-dir /hyp3-back-projection | ||
|
||
ENTRYPOINT ["/hyp3-back-projection/src/hyp3_back_projection/etc/entrypoint.sh"] | ||
CMD ["-h"] |
This file contains 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 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 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
Oops, something went wrong.