Skip to content
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

Update aspera-client-docker image to use the new download workflow #5

Merged
merged 7 commits into from
Jan 29, 2024

Conversation

sbesson
Copy link
Member

@sbesson sbesson commented Dec 19, 2023

See IDR/idr.openmicroscopy.org#190

This updates the source of the https://hub.docker.com/r/imagedata/download Docker image to use the new Aspera download workflow. This assumes the IDR team wants to keep supporting this image and download workflow. Otherwise, it should probably be archived/deprecated

Included in this PR are the minimal change to make the command functional again

  • Drops the study input in favor of the generic fasp-public user
  • Update the README with the new command format
  • Update the GitHub workflow to use recent GitHub actions and Docker labels
  • Upgrade the base image to Rocky Linux 9

Drops the study input in favor of the generic fasp-public user
Update the README with the new command format
| idr0034 | 20170421-original/Nathalie/HipSci Experiment 10 Plate 1__2014-08-21T17_57_35-Measurement1 | experiment_10 | 5.1G |
docker run -ti --rm -v /tmp/data:/data imagedata/download SOURCE TARGET

where SOURCE can be any subfolder under https://ftp.ebi.ac.uk/pub/databases/IDR/. For instance
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@pwalczysko
Copy link

pwalczysko commented Dec 20, 2023

Test 1 on Mac M1 - build and run the docker as-is in this PR, use the docker run... cmd from README and building an image test-seb:

aspera-client-docker %  docker build -f Dockerfile --rm --no-cache -t test-seb . 
aspera-client-docker %  docker run -ti --rm -v /Users/pwalczysko:/data test-seb idr0001-graml-sysgro/20151116-verified/JL_120731_S6A /data/JL_120731_S6A 
/home/data/.aspera/connect/bin/ascp -P33001 -l 40m -i /home/data/.aspera/connect/etc/asperaweb_id_dsa.openssh -k 0 [email protected]:/pub/databases/IDR/idr0001-graml-sysgro/20151116-verified/JL_120731_S6A /data/JL_120731_S6A
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

As per https://stackoverflow.com/questions/71040681/qemu-x86-64-could-not-open-lib64-ld-linux-x86-64-so-2-no-such-file-or-direc/71611002#71611002, this ^^^ is caused by me being on M1. Went for a solution where I add the line into the Dockerfile FROM --platform=linux/amd64 centos:centos7 as per line 3 in sbesson@ab405c3, saved the file as DockerfileM1 and build a new image test-sebm1. This works fine, see below.

aspera-client-docker % docker build -f DockerfileM1 --rm --no-cache -t test-sebm1 .
aspera-client-docker % docker run -ti --rm -v /Users/pwalczysko:/data test-sebm1 idr0001-graml-sysgro/20151116-verified/JL_120731_S6A /data/JL_120731_S6A
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
/home/data/.aspera/connect/bin/ascp -P33001 -l 40m -i /home/data/.aspera/connect/etc/asperaweb_id_dsa.openssh -k 0 [email protected]:/pub/databases/IDR/idr0001-graml-sysgro/20151116-verified/JL_120731_S6A /data/JL_120731_S6A
001005001.flex                                                     53%   47MB 38.9Mb/s    00:09 ETA

Note: Adding a --platform flag to the docker run... cmd was not successful in my hands.
e.g.

docker run -ti --rm -v --platform linux/amd64 /Users/pwalczysko:/data test-seb2 idr0001-graml-sysgro/20151116-verified/JL_120731_S6A /data/JL_120731_S6A
Unable to find image 'linux/amd64:latest' locally
docker: Error response from daemon: pull access denied for linux/amd64, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

Only the Dockerfile edit worked.

@pwalczysko
Copy link

Is it reasonable to keep using centos7 images for this workflow ?

Copy link

@pwalczysko pwalczysko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two issues:

  1. Please comment on the M1 support - imho, this type of platform is more and more prevalent and we could offer a solution in this repo.
  2. centos7 ?

@sbesson
Copy link
Member Author

sbesson commented Dec 20, 2023

Last commit should allow to build the Linux/amd64 image independently on whether the build machine is arm64 or amd64. Thanks @pwalczysko

On the base image, I am of the opinion we should change it to either Ubuntu 22.04 or Rocky Linux 9 but am not opinionated on either of them. Happy to follow the guidance of the IDR team

@jburel
Copy link
Member

jburel commented Dec 26, 2023

since the initial image was centOS 7, it might be more natural to switch to Rocky Linux 9

@pwalczysko
Copy link

Tested last 2 commits (Rocky Linux 9 based image).

Works fine on

  • Mac Apple M1 Pro
  • Mac amd64 (old laptop)

Copy link
Member

@joshmoore joshmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 (Here's to an AND vs OR option for the requested reviewers 😉)

@sbesson
Copy link
Member Author

sbesson commented Jan 29, 2024

Unless someone wants to take the lead on this, I'll merge this PR by EOB and tag 0.4.0, hoping the deployment logic is still functional

@sbesson sbesson merged commit 3414623 into IDR:master Jan 29, 2024
2 checks passed
@sbesson sbesson deleted the aspera_2023_update branch January 29, 2024 15:57
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: "${{ steps.getprefix.outputs.prefix }}"
prefix: "${{ env.name }}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I missed there was a breaking change and a : need to be appended as in ome/omero-server-docker@6f31737.

Unfortunately, this has created quite a few unwanted images at https://hub.docker.com/u/imagedata. @jburel @joshmoore do you have the credentials to delete those? I can open a PR for a follow-up 0.4.1 release (unless you'd prefer me to delete the tag).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants