diff --git a/CHANGELOG.md b/CHANGELOG.md index f126835..5153553 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,9 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Python 3.13 support - Updated dockerimage to ensure on login the conda environment is activated -- Instructions in the README for testing outputs using the associated docker image +- Instructions in the README for OPERA delivery. - A `.Dockerignore` file to remove extraneous files from the docker image +- Allow `/home/ops` directory in Docker image to be open to all users ## [0.0.2] diff --git a/Dockerfile b/Dockerfile index 287102b..c1b1de8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,9 @@ WORKDIR /home/ops COPY --chown=dist_user:dist_user environment.yml /home/ops/dist-s1/environment.yml COPY --chown=dist_user:dist_user . /home/ops/dist-s1 +# Ensure all files are read/write by the user +RUN chmod -R 777 /home/ops + # Create the environment with mamba RUN mamba env create -f /home/ops/dist-s1/environment.yml && \ conda clean -afy diff --git a/README.md b/README.md index 83c48d8..abe7edf 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ It is worth noting that the SDS workflow (`dist-s1 run_sas`) is *not* user frien ### The `dist-s1 run_sas` Entrypoint ``` -dist-s1 --runconfig_yml_path +dist-s1 run_sas --runconfig_yml_path ``` See `tests/test_main.py` for an example of how to use the CLI with sample data. @@ -76,27 +76,34 @@ Notes: Make sure you have Docker installed for [Mac](https://docs.docker.com/desktop/setup/install/mac-install/) or [Windows](https://docs.docker.com/desktop/setup/install/windows-install/). We call the docker image `dist_s1_img` for the remainder of this README. ``` -docker build -f Dockerfile -t dist_s1_img . +docker build -f Dockerfile -t dist-s1 . ``` ### Running the Container Interactively To run the container interactively: ``` -docker run -ti dist_s1_img +docker run -ti dist-s1 ``` Within the container, you can run the CLI commands and the test suite. -### Inspecting Outputs from the Image -All the of the test data is currently stored in our test suite within this repostiroy and is run automatically with each PR/merge/release. -However, to allow for additional external/SDS testing via the published Docerk image, we share some of the relevant instructions. -We assume that a docker image (as above) has been built with the tag `dist_s1_img`. -Navigate to a new directory and run the following commands: +# Delivery Instructions + +There are certain releases associated with OPERA project deliveries. Here we provide instructions for how to run and verify the DIST-S1 workflow. + +We have included sample input data, associated a Docker image via the Github registry, and run tests via github actions all within this repository. + +``` +docker pull ghcr.io/opera-adt/dist-s1 +``` +If a specific version is required (or assumed for a delivery), then you use `docker pull ghcr.io/opera-adt/dist-s1:` e.g. ``` -# Copy the test data from the docker image to the current working directory -docker cp $(docker create dist_s1_img):/home/ops/dist-s1/tests ./tests -# Run the DIST-S1 workflow using the test data -docker run -v "$PWD/tests:/home/ops/dist-s1/tests" dist_s1_img bash -l -c "cd dist-s1/tests && dist-s1 run_sas --runconfig_yml_path test_data/10SGD_cropped/runconfig.yml" +docker pull ghcr.io/opera-adt/dist-s1:0.0.4 +``` +The command will pull the latest released version of the Docker image. To run the test suite, run: +``` +docker run ghcr.io/opera-adt/dist-s1 bash -l -c 'cd dist-s1 && pytest tests' ``` -You should see a `tests/` directory matching the one in this repository in your current working directory. Furthermore, there now should be a `tests/OPERA_L3_DIST-ALERT-S1_*/` directory containing the expected output of this test. This is still under development, but provides a useful way to inspect the eventual DIST-S1 output. + +