-
Notifications
You must be signed in to change notification settings - Fork 695
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
[FEATURE] Build automation for fetching Seqera Containers #6694
Labels
enhancement
New feature or request
Comments
Before I forget, here is the code snippet used for https://seqera.io/containers/ that fetches the url = f"{wave_api_url}/v1alpha1/inspect"
logger.info(f"Calling image inspect at {url} for image URL {image_url}")
data = {"containerImage": image_url}
if platform_pat:
data["towerAccessToken"] = platform_pat
else:
logger.warning("'PLATFORM_PAT' not set, no auth to Wave back end")
async with httpx.AsyncClient() as client:
response = await client.post(
url=url,
json=data,
headers={"Content-Type": "application/json"},
)
if response.is_success:
data = response.json()
layers = data.get("container", {}).get("manifest", {}).get("layers", [])
is_singularity = len(layers) == 1 and layers[0].get("mediaType", "").endswith(".sif")
if not is_singularity:
raise HTTPException(status_code=400, detail="Not a singularity image")
if "digest" not in layers[0]:
raise HTTPException(status_code=400, detail="No 'digest' in first layer found")
digest = layers[0]["digest"].replace("sha256:", "")
url = f"https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/{digest[:2]}/{digest}/data"
return url
else:
raise HTTPException(status_code=response.status_code, detail=response.text) We should be able to reuse this to get the HTTP links as well. |
edmundmiller
added a commit
that referenced
this issue
Oct 2, 2024
#6694 (comment) Co-authored-by: ewels <[email protected]>
edmundmiller
added a commit
that referenced
this issue
Oct 2, 2024
edmundmiller
added a commit
that referenced
this issue
Oct 2, 2024
And by that I mean comment out the code. Seriously anyone reading these?
edmundmiller
added a commit
that referenced
this issue
Oct 2, 2024
#6694 (comment) Co-authored-by: ewels <[email protected]>
edmundmiller
added a commit
that referenced
this issue
Oct 2, 2024
edmundmiller
added a commit
that referenced
this issue
Oct 2, 2024
And by that I mean comment out the code. Seriously anyone reading these?
edmundmiller
added a commit
that referenced
this issue
Oct 3, 2024
* build(pints): Switch to PyPI The bioconda builds aren't getting updated, and the biocontainers containers aren't getting updated. They're publishing to PyPI consistently, so we'll meet them where they're at. Really need the stuff in hyulab/PINTS@101c0cb like yesterday. * chore: Add renovate comment * build: Include pybedtools manually And htslib for bgzip. pybedtools wiht pip needs gcc to install. * chore: Copy code from @ewels #6694 (comment) Co-authored-by: ewels <[email protected]> * build: Fix uv shebang * fix(#6694): Remove async code * style: Run ruff * fix(#6694): Clean up some errors And by that I mean comment out the code. Seriously anyone reading these? * chore: Clean up httpx * refactor: Simplify script * fix: Remove oras * fix: containerimage => containerImage * fix: Remove oras and mediatype => mediaType * style: Run ruff --------- Co-authored-by: ewels <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow on to #5832 to discuss specifically the automation for fetching Seqera Containers.
The text was updated successfully, but these errors were encountered: