Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Publish frontend/backend images to Ebrains Docker Registry
on:
[workflow_dispatch]

jobs:
publish_images:
runs-on: ubuntu-latest
steps:
- name: log in
run: |
docker login ${{secrets.EBRAINS_REGISTRY_SERVER}} -u ${{ secrets.DOCKER_REGISTRY_USER }} -p ${{secrets.DOCKER_REGISTRY_PASSWORD}}
- name: build and publish frontend and backend
run: |
make publish

15 changes: 9 additions & 6 deletions backend/blue_naas/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path
from random import choice
from string import ascii_uppercase
from urllib.parse import urlunsplit
from urllib.parse import urlunsplit, urlparse
from zipfile import ZipFile

import requests
Expand All @@ -26,11 +26,14 @@

def _load_from_url(url):
try:
zip_url = urlunsplit(('https',
'object.cscs.ch',
'v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/' + url,
None,
None))
if urlparse(url).scheme:
zip_url = url
else:
zip_url = urlunsplit(('https',
'object.cscs.ch',
'v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/' + url,
None,
None))
L.debug('downloading emodel from url: %s', zip_url)
response = requests.get(zip_url, stream=True, timeout=10)
try:
Expand Down