-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use the Github action on a self-hosted runner #11
Comments
I think a good solution should be to add a new option to the action where one inputs the path of the existing conda installation and an environment for the runner, like conda-installation-path:
description: "Path to an existing installation of conda when calling this action"
required: false
default: "~/"
conda-env-runner:
description: "Name of the conda environment to use on the runner"
required: false
default: "showyourwork-runner" # maybe this could be suffixed with the RUNNER_NAME, GITHUB_REPOSITORY and GITHUB_REF_NAME then, if defined, we use that to activate the base environment, create the environment (which should be cached optionally cached I guess?) and continue. |
@dfm any ideas on this? I am not an expert so I might take more time than needed to solve this |
I do not see a this might not be a problem for github runners, because I guess they are e.g. docker containers removed after a while, but for self-hosted machines this might cause trouble |
Actually, why do we need that setup_conda function? can't we just use e.g. https://github.com/marketplace/actions/setup-miniconda? |
Couple of thoughts, just for me to not forget:
|
Discussed in showyourwork/showyourwork#472
Originally posted by HealthyPear September 9, 2024
As my workflows take quite a while and I am forced to use private repositories, I need to run them on a self-hosted machine.
Unfortunately the machine I can use is not self-administered, and the pip installation is externally managed, leading to this error when showyourwork gets installed,
Did anyone ever manage to use showyourwork's GitHub action in pair with an action which provides its own pip installation?
I tried with both setup-python and setup-micromamba, but showyourwork always tries to use the default pip installation.
Maybe this is a limitation of the action? Technically this action should download and install its own
miniconda
installation,showyourwork-action/src/conda.js
Line 55 in 202dc71
so I do not understand if it's a mistake on my side.
UPDATE
OK I found what is the problem and I think it's something that needs to be changed on the GitHub action side.
The part where showyourwork is installed by the action is performed in
src/conda.js
,where
const conda_paths = ["~/.conda", "~/.condarc", "~/conda_pkgs_dir"];
.The problem is that if you are running on a self-hosted runner as in this case the conda installation might be already present (i.e. the
.conda
folder exists and there is something inside. Though, this something might not be the conda installation but just some user-related info about the existing environments (see conda/conda#5388).In my case it contains only an
environments.txt
files with the path of all existing environments, but my conda installation is somewhere else.There is nothing in the GitHub Action that deals with an existing conda installation at some path.
Given this I think this should be a proper issue.
The text was updated successfully, but these errors were encountered: