Python Action not supported
See original GitHub issueI see in the README example how to install Python “manually”, but there’s a GH action setup-python
already built for installing Python that seems recommended.
I was trying this out with the cml docker container, and there seems to be an odd interaction between the docker container and setup-python
.
For example, if I’m not using our docker container and run this workflow:
name: your-workflow-name
on: [push]
jobs:
run:
runs-on: [ubuntu-latest]
container: docker://dvcorg/dvc-cml:latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sklearn
Everything runs beautifully. As soon as I add container: docker://dvcorg/dvc-cml:latest
to the .yaml file, though, I hit the following error:
Any ideas?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Github action using wrong version of Python - Stack Overflow
The root cause is the section - uses: actions/setup-python@v3 with: python-version: "3.10" cache: "poetry". with the line caching poetry .
Read more >warnings — Warning control — Python 3.11.1 documentation
This argument exists primarily for testing the warnings module itself. If the action argument is not None , the remaining arguments are passed...
Read more >Add card actions in a bot - Teams - Microsoft Learn
Teams does not support the potentialActions property. Card actions are different than suggested actions in Bot Framework or Azure Bot ...
Read more >Preparing apps for actions - IBM Cloud Docs
If your runtime is not supported, you can package your app in a Docker image. ... compatible with the Python runtime used for...
Read more >How to Fix the HTTP 405 Method Not Allowed Error - Kinsta®
The 405 Method Not Allowed error occurs when the web server is configured in a way that does not allow you to perform...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got this working with the
dvcorg/cml:latest
image. By default, the container service mounts/opt/hostedtoolcache
to/__t
in the container, but that breaks the Python installs which are compiled to live in/opt/hostedtoolcache
specifically.But the container syntax lets you add mounted volumes. Here’s a workflow file that worked for me:
It also works with
setup-python@v2
and it works on a self-hosted runner. I’m pretty sure the base image will need to be Ubuntu 18.04, but it looks like all your images are so that wouldn’t be a problem.IMO this is better than shipping with your own Python because matrix testing works and it would make CML workflows more similar to other GitHub Actions setups. I’m happy to help with PRs to update examples if you think this is useful.
NOTE: to get it to work in a self-hosted runner, I added
AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache/
to my.env
file.Every combination I can think of works as expected (except
setup-python@v1
inside the docker runner, which was already true). Also, I can’t think of any reason why this would be a problem:/__t
in the container will still be there/opt/hostedtoolcacne
on the host anywayI say 🚢 !