Docker executor launches using virtualenv python
See original GitHub issueSummary
If I run Dagit using a virtulaenv, the Docker executor tries to run a command with my virtual environment’s python (which doesn’t exist in the Docker container)
Reproduction
Run dagit
from within a virtualenv.
Then create a config that looks something like this:
execution:
config:
image: <Docker Image>
...
And the launched command should fail since it will have something like this as its default command:
"Cmd": [
"/Users/nlarusstone/.virtualenvs/pipeline/bin/python3",
"-m",
"dagster",
"api",
"execute_step",
....
Error will look like:
/opt/venv/bin/python3: can't open file '/Users/nlarusstone/.virtualenvs/pipeline/bin/python3': [Errno 2] No such file or directory
Additional Info about Your Environment
Dagster 0.14.20
OSX 11.6.2
Docker 20.10.11
Message from the maintainers:
Impacted by this bug? Give it a 👍. We factor engagement into prioritization.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Elegantly activating a virtualenv in a Dockerfile - Python⇒Speed
One solution is to explicitly use the path to the binaries in the virtualenv. In this case we only have two repetitions, but...
Read more >Integrating Python Poetry with Docker
In a nutshell, your build stage installs everything into the virtualenv, and the final stage just copies the virtualenv over into a small...
Read more >Docker Containers, Python Virtual Environments, & Virtual ...
Let's jump right in! This is a practical hands-on guide and introduction to docker containers, python virtual environments, and virtual ...
Read more >Multi-job pipelines using shell executor fundamentally ... - GitLab
python3 venv embeds absolute paths in the generated environment ... In a docker executor, the job workspace is mounted and always appears of ......
Read more >Running PySpark with Virtualenv - Henning Kropp
In this post we show what this means for Python environments being used by Spark. YARN Application Deployment. As mentioned earlier does YARN ......
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
https://github.com/dagster-io/dagster/pull/8571 will fix the first issue you ran into and is something we’ve been meaning to do for a while, thanks for bringing it to our attention
Hi @nlarusstone - sorry for the trouble here. I think we can clean this up so that the default entry point is just “dagster” in this case.
In the meantime, running your code in your own grpc server (https://docs.dagster.io/concepts/repositories-workspaces/workspaces#running-your-own-grpc-server) is one potential workaround that I believe would make your steps run just using ‘dagster’ as the entrypoint rather than a specific python environment.