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

Problem with .github action workflow #12

Closed
thibaulttabarin opened this issue Jul 20, 2022 · 13 comments · Fixed by #14
Closed

Problem with .github action workflow #12

thibaulttabarin opened this issue Jul 20, 2022 · 13 comments · Fixed by #14
Assignees

Comments

@thibaulttabarin
Copy link
Member

thibaulttabarin commented Jul 20, 2022

Try to create a new version with some update from the branch rescael_origin#11 addressing the issue #11
to test the container I use a fork on my account
BGNN-trait-segmentation.

The problem I have encounter is that the dockerfile fails because the download of the pretrained model see the fail action https://github.com/thibaulttabarin/BGNN-trait-segmentation/actions/runs/2707871086
I manage to download manully after ignoring the unsafe web site warning (which I think are new)
So now it seems that I can't build my container using github action how do I solve this problem

Cheers

@thibaulttabarin
Copy link
Member Author

I fix the error by using wget -c --no-check-certificate
However I feel it is not well resolved

@johnbradley
Copy link
Contributor

Here is the error from the logs:

#16 [12/13] RUN wget -P /pipeline/.cache/torch/hub/checkpoints http://data.lip6.fr/cadene/pretrainedmodels/se_resnext50_32x4d-a260b3a4.pth
#16 0.380 --2022-07-20 21:49:39--  http://data.lip6.fr/cadene/pretrainedmodels/se_resnext50_32x4d-a260b3a4.pth
#16 0.380 Resolving data.lip6.fr (data.lip6.fr)... 132.227.201.10
#16 0.638 Connecting to data.lip6.fr (data.lip6.fr)|132.227.201.10|:80... connected.
#16 0.723 HTTP request sent, awaiting response... 301 Moved Permanently
#16 0.808 Location: https://data.lip6.fr/cadene/pretrainedmodels/se_resnext50_32x4d-a260b3a4.pth [following]
#16 0.808 --2022-07-20 21:49:40--  https://data.lip6.fr/cadene/pretrainedmodels/se_resnext50_32x4d-a260b3a4.pth
#16 0.817 Connecting to data.lip6.fr (data.lip6.fr)|132.227.201.10|:443... connected.
#16 0.993 ERROR: cannot verify data.lip6.fr's certificate, issued by 'CN=TERENA SSL CA 3,O=TERENA,L=Amsterdam,ST=Noord-Holland,C=NL':
#16 0.993   Issued certificate has expired.
#16 0.993 To connect to data.lip6.fr insecurely, use `--no-check-certificate'.
#16 ERROR: executor failed running [/bin/sh -c wget -P /pipeline/.cache/torch/hub/checkpoints http://data.lip6.fr/cadene/pretrainedmodels/se_resnext50_32x4d-a260b3a4.pth]: exit code: 5

The website https://data.lip6.fr needs to update their certificate. If you open it in the browser you get the same.

@johnbradley
Copy link
Contributor

@johnbradley
Copy link
Contributor

It looks like https://github.com/Cadene/pretrained-models.pytorch repo hasn't been changed in 5 years and says it's a Work in progress.

@johnbradley
Copy link
Contributor

@thibaulttabarin Do you know if there might be a more reliable location to download this file? If this is the only location the file exists and we must disable certificate checking we should verify against a known good MD5 hash(or something similar).

@thibaulttabarin
Copy link
Member Author

thanks for looking into that,
I think here is something to discuss about project structure...
this is not my code so I understand it but I feel that if I have to fix, tweak every piece of code that is not mine I won't see the end.
To answer your questions I try to find alternative for the weight /se_resnext50_32x4d-a260b3a4.pth but I didn't find the same. There are other source for se_resnext50_32x4d but there is no guaranted that they will the same. It should be possible redo the project using official weight from pytorch official website but no I wouldn't take this approach.
What I would suggest if we have server where we can store all those weight so we don't have to rely on those third party module server. For instance all those weight are in the cache on my local machine so then when I rerun those things I don't have any problem, it is problably would be the same for Maruf who develop the code initially.

@johnbradley
Copy link
Contributor

To help with this issue I looked into uploading the model files to the Imageomics Dataverse.
I have a draft Dataset that contains the saved_models/Trained_model_SM.pth file here:
https://covid-commons.osu.edu/dataset.xhtml?persistentId=doi:10.5072/FK2/SWV0YL&version=DRAFT
Next I'm going to upload the se_resnext50_32x4d-a260b3a4.pth file to this Dataset.

The DOI is doi:10.5072/FK2/SWV0YL for this dataset. I'm looking at using pyDataverse to download the data in the Docker container.

@johnbradley
Copy link
Contributor

I created a separate dataset for the se_resnext50_32x4d file. Otherwise it would look like Maruf created that file.
https://covid-commons.osu.edu/dataset.xhtml?persistentId=doi:10.5072/FK2/CGWDW4&version=DRAFT
This new Dataset DOI is doi:10.5072/FK2/CGWDW4

@thibaulttabarin
Copy link
Member Author

that sounds good, that's what I was looking for, a place where I could put all the models used in the project. I will have a look later this week.
I would have a couple of question about how to add files on the dataverse.

johnbradley added a commit to johnbradley/BGNN-trait-segmentation that referenced this issue Sep 6, 2022
Changes Dockerfile to download model files from the Imageomics
Dataverse. Currently the datasets aren't public yet so
an authentication token is required to download the models.
Once these datasets are published the token shouldn't be required.

You can manually build the container supplying a token like so:
docker build --build-arg DATAVERSE_API_TOKEN=<yourtoken> -t <tagname> .

Fixes hdr-bgnn#12
@thibaulttabarin
Copy link
Member Author

Hey John, how are you doing?
I have questions about API_TOKEN and how to pass them as build-args in github action I am a bit block. Do you have time to discuss today? cheers

@johnbradley
Copy link
Contributor

@thibaulttabarin I'm doing well. Simply we can use github Secrets to store the API token. Then pass that environment variable to the docker build. I'll email you to setup a time to talk.

@thibaulttabarin
Copy link
Member Author

well, that exactly what I have been trying to do (using Secret to store the API) but there is something not working. I will check you setup and try to figure out what not working in my case.
Cheers

@johnbradley
Copy link
Contributor

I think what we need to do is set the build-args to a secret for the Docker build.
Perhaps something like this:

      - name: Build and push Docker image
        uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
        with:
          context: Segment_mini
          build-args: "API_TOKEN=${{ secrets.API_TOKEN }}"

johnbradley added a commit to johnbradley/BGNN-trait-segmentation that referenced this issue Sep 21, 2022
Changes Dockerfile to download model files from the Imageomics
Dataverse. Currently the datasets aren't public yet so
an authentication token is required to download the models.
Once these datasets are published the token shouldn't be required.

The DATAVERSE_API_TOKEN Secret will need to be setup in GitHub
so the container will build on new releases.

You can manually build the container supplying a token like so:
docker build --build-arg DATAVERSE_API_TOKEN=<yourtoken> -t <tagname> .

Fixes hdr-bgnn#12
johnbradley added a commit to johnbradley/BGNN-trait-segmentation that referenced this issue Sep 21, 2022
Changes Dockerfile to download model files from the Imageomics
Dataverse. Currently the datasets aren't public yet so
an authentication token is required to download the models.
Once these datasets are published the token shouldn't be required.

The DATAVERSE_API_TOKEN Secret will need to be setup in GitHub
so the container will build on new releases.

You can manually build the container supplying a token like so:
docker build --build-arg DATAVERSE_API_TOKEN=<yourtoken> -t <tagname> .

Fixes hdr-bgnn#12
johnbradley added a commit to johnbradley/BGNN-trait-segmentation that referenced this issue Sep 21, 2022
Changes Dockerfile to download model files from the Imageomics
Dataverse. Currently the datasets aren't public yet so
an authentication token is required to download the models.
Once these datasets are published the token shouldn't be required.

The DATAVERSE_API_TOKEN Secret will need to be setup in GitHub
so the container will build on new releases.

You can manually build the container supplying a token like so:
docker build --build-arg DATAVERSE_API_TOKEN=<yourtoken> -t <tagname> .

Fixes hdr-bgnn#12
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 a pull request may close this issue.

2 participants