-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add option to install dependencies to the system site packages #234
Comments
You can disable the automatic creation of virtualenvs by using:
|
This is common misconception. See Deploying Python Applications with Docker - A Suggestion or Why people create virtualenv in a docker container?. This is duplicate of issue #218 |
There are some situations when using a virtualenv creates complications. For example a docker container with some global python package. In my case it was compiled from the source freecad. Exposing it to the virtualenv is a headache. |
For those who find here later, the config command worked for me was:
|
how about use the export option? https://python-poetry.org/docs/cli/#export
|
I heard you liked virtual environments so I put a virtual environment in your virtual environment so you can isolate while you're isolated. More seriously: calling this a "misconception" is overstated. There can be contexts where a virtual-env in a docker container is useful but many (and arguably most) of them are the result of an anti-pattern. The most common anti-pattern to make them useful is breaking the "one app per container" rule. If your container is supposed to just run your python app then the "system" packages should be redundant and just useless files in the image. This redundancy should mean there's no need for a virualenv; you should just be able to clobber the system packages. |
The problem with this is that the application is not properly installed as a package. You only install the requirements. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
It is not always easy to have some packages installed inside the virtualenv + having the virtualenv inside the docker container, which only runs your app, makes no sense.
It would be nice to have an option i.e.
--system
to deploy your package right inside the system without venv.Now solving it in a stupid way:
The text was updated successfully, but these errors were encountered: