-
Notifications
You must be signed in to change notification settings - Fork 7
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 #1 from gshiroma/main
Add first implementation of the OPERA RTC workflow for IF delivery
- Loading branch information
Showing
22 changed files
with
3,552 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
build: | ||
machine: | ||
image: ubuntu-2004:current | ||
resource_class: medium | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Build RTC docker image" | ||
command: | | ||
docker build . -f docker/Dockerfile | ||
workflows: | ||
build-workflow: | ||
jobs: | ||
- build |
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,59 @@ | ||
name: Bug Report | ||
description: Create a report to help us improve | ||
title: "[Bug]: " | ||
labels: ["bug", "needs triage"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
> _Thanks for filing a bug ticket. We appreciate your time and effort. Please answer a few questions._ | ||
- type: dropdown | ||
id: checked-for-duplicates | ||
attributes: | ||
label: Checked for duplicates | ||
description: Have you checked for duplicate issue tickets? | ||
multiple: false | ||
options: | ||
- "Yes - I've already checked" | ||
- "No - I haven't checked" | ||
validations: | ||
required: yes | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Describe the bug | ||
description: A clear and concise description of what the bug is. Plain-text snippets preferred but screenshots welcome. | ||
placeholder: Tell us what you saw | ||
value: "When I did [...] action, I noticed [...]" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: expected-behavior | ||
attributes: | ||
label: What did you expect? | ||
description: A clear and concise description of what you expect to happen | ||
placeholder: Tell us what you expected | ||
value: "I expected [...]" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduction | ||
attributes: | ||
label: Reproducible steps | ||
description: "How would we reproduce this bug? Please walk us through it step by step. Plain-text snippets preferred but screenshots welcome." | ||
value: | | ||
1. | ||
2. | ||
3. | ||
... | ||
render: bash | ||
- type: textarea | ||
id: environment | ||
attributes: | ||
label: Environment | ||
description: "What is your environment?" | ||
value: | | ||
- Version of this software [e.g. vX.Y.Z] | ||
- Operating System: [e.g. MacOSX with Docker Desktop vX.Y] | ||
... | ||
render: bash |
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,48 @@ | ||
name: New Feature | ||
description: Submit a new feature request | ||
title: "[New Feature]: " | ||
labels: ["enhancement", "needs triage"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
> _Thanks for filing a new feature request. We appreciate your time and effort. Please answer a few questions._ | ||
- type: dropdown | ||
id: checked-for-duplicates | ||
attributes: | ||
label: Checked for duplicates | ||
description: Have you checked for duplicate issue tickets? | ||
multiple: false | ||
options: | ||
- "Yes - I've already checked" | ||
- "No - I haven't checked" | ||
validations: | ||
required: yes | ||
- type: dropdown | ||
id: checked-alternatives | ||
attributes: | ||
label: Alternatives considered | ||
description: Have you considered alternative solutions to your feature request? | ||
options: | ||
- "Yes - and alternatives don't suffice" | ||
- "No - I haven't considered" | ||
validations: | ||
required: yes | ||
- type: textarea | ||
id: related-problems | ||
attributes: | ||
label: Related problems | ||
description: Is your feature request related to any problems? Please help us understand if so, including linking to any other issue tickets. | ||
placeholder: Tell us the problems | ||
value: "I'm frustrated when [...] happens as documented in issue-XYZ" | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Describe the feature request | ||
description: A clear and concise description of your request. | ||
placeholder: Tell us what you want | ||
value: "I need or want [...]" | ||
validations: | ||
required: true |
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,154 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ | ||
|
||
|
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,84 @@ | ||
FROM ubuntu:22.04 | ||
|
||
LABEL author="OPERA ADT" \ | ||
description="RTC interface release" \ | ||
version="interface_0.1" | ||
|
||
RUN apt-get -y update &&\ | ||
apt-get -y install curl zip make &&\ | ||
adduser --disabled-password rtc_user | ||
|
||
RUN mkdir -p /home/rtc_user/OPERA/RTC | ||
COPY . /home/rtc_user/OPERA/RTC | ||
RUN chmod -R 755 /home/rtc_user &&\ | ||
chown -R rtc_user:rtc_user /home/rtc_user/OPERA | ||
USER rtc_user | ||
|
||
ENV CONDA_PREFIX=/home/rtc_user/miniconda3 | ||
|
||
|
||
#Install conda and | ||
WORKDIR /home/rtc_user | ||
RUN curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh &&\ | ||
bash miniconda.sh -b -p ${CONDA_PREFIX} &&\ | ||
chmod -R 755 ${HOME}/miniconda3 &&\ | ||
rm ${HOME}/miniconda.sh | ||
|
||
ENV PATH=${CONDA_PREFIX}/bin:${PATH} | ||
ENV POSTFIX_ISCE3="rtc" | ||
ENV ISCEHOME=/home/rtc_user | ||
|
||
RUN ${CONDA_PREFIX}/bin/conda init bash | ||
|
||
#Install ISCE3 from source code | ||
RUN echo "Installing Conda environment for ISCE3" &&\ | ||
mkdir -p ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/src &&\ | ||
mkdir -p ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/build &&\ | ||
mkdir -p ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/install &&\ | ||
cd ${ISCEHOME} &&\ | ||
curl -sSL https://github.com/gshiroma/isce3/archive/refs/heads/opera_rtc.zip -o isce3_opera_rtc.zip &&\ | ||
unzip -d ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3} isce3_opera_rtc.zip &&\ | ||
cd ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/src &&\ | ||
ln -s ../isce3-opera_rtc isce3 &&\ | ||
rm ${ISCEHOME}/isce3_opera_rtc.zip &&\ | ||
cd ${HOME} &&\ | ||
conda create --name isce3_rtc --file ./OPERA/RTC/Docker/specfile.txt &&\ | ||
chmod -R 755 ${CONDA_PREFIX}/envs/isce3_rtc &&\ | ||
cd ${ISCEHOME}/tools/isce_$POSTFIX_ISCE3/src | ||
|
||
SHELL ["conda", "run", "-n", "isce3_rtc", "/bin/bash", "-c"] | ||
|
||
ENV CC=${CONDA_PREFIX}/envs/isce3_rtc/bin/x86_64-conda-linux-gnu-gcc | ||
ENV CXX=${CONDA_PREFIX}/envs/isce3_rtc/bin/x86_64-conda-linux-gnu-g++ | ||
ENV PATH=$PATH:${ISCEHOME}/tools/isce_$POSTFIX_ISCE3/install/bin | ||
ENV PYTHONPATH=$PYTHONPATH:${ISCEHOME}/tools/isce_$POSTFIX_ISCE3/install/packages | ||
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/install/lib | ||
|
||
RUN cd ${ISCEHOME}/tools/isce_$POSTFIX_ISCE3/build &&\ | ||
cmake -DCMAKE_INSTALL_PREFIX=${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/install -DWITH_CUDA=OFF ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/src/isce3 &&\ | ||
make -j32 VERBOSE=ON &&\ | ||
make install &&\ | ||
rm -r ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/build &&\ | ||
rm -r ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/isce3-opera_rtc &&\ | ||
chmod -R 755 ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/install &&\ | ||
cd /home/rtc_user/miniconda3/envs/isce3_rtc/lib &&\ | ||
ln -s ${ISCEHOME}/tools/isce_${POSTFIX_ISCE3}/install/lib/libisce3.so &&\ | ||
echo 'ISCE3 installation successful!' | ||
|
||
RUN echo "Installing OPERA s1-reader and RTC" &&\ | ||
mkdir -p $HOME/OPERA &&\ | ||
cd $HOME/OPERA &&\ | ||
curl -sSL https://github.com/seongsujeong/s1-reader/archive/refs/heads/correction_and_calibration.zip -o s1_reader.zip &&\ | ||
unzip s1_reader.zip &&\ | ||
chmod -R 755 s1-reader-correction_and_calibration &&\ | ||
ln -s s1-reader-correction_and_calibration s1-reader &&\ | ||
rm s1_reader.zip &&\ | ||
python -m pip install ./s1-reader &&\ | ||
cd $HOME/OPERA &&\ | ||
pip install ./RTC &&\ | ||
mkdir /home/rtc_user/scratch &&\ | ||
echo 'conda activate isce3_rtc' >>/home/rtc_user/.bashrc | ||
|
||
WORKDIR /home/rtc_user/scratch | ||
|
||
ENTRYPOINT ["conda", "run", "-n", "isce3_rtc","rtc_s1.py"] |
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,28 @@ | ||
name: isce3_rtc | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python>=3.9,<3.10 | ||
- cmake | ||
- eigen | ||
- fftw | ||
- gdal | ||
- gmock | ||
- gtest | ||
- gcc_linux-64 < 10 | ||
- gxx_linux-64 < 10 | ||
- gfortran_linux-64 | ||
- h5py | ||
- hdf5 | ||
- libgcc-ng | ||
- libstdcxx-ng | ||
- numpy | ||
- pybind11 | ||
- pyre | ||
- pytest | ||
- cython | ||
- ruamel.yaml | ||
- scipy | ||
- shapely | ||
- yamale | ||
- backoff |
Oops, something went wrong.