Open Jakobhenningjensen opened 6 months ago
does not reproduce - as expected I see an error about connecting to "my_repo" but no sign of the error that you are reporting
$ poetry publish --build -r my_repo
Building Foo (0)
- Building sdist
- Built foo-0.tar.gz
- Building wheel
- Built foo-0-py3-none-any.whl
Publishing Foo (0) to my_repo
- Uploading foo-0-py3-none-any.whl FAILED
Connection Error: We were unable to connect to the repository, ensure the url is correct and can be reached.
please provide a way to reproduce
I don't know how else I should reproduce apart from the code above, since it's the one causing the error.
If I remove the torch-gpu-linux
source (and just have torch="2.3.0"
) it works fine
maybe provide a dockerfile in which the error happens, then we should get past any "works on my computer" differences
(still works on my computer, though!)
Just being curious; if you use the "-vvv" flag for publish, is "pytorch-gpu" only being added once?
For some odd reason, changing the version from "0" to "1" in my .toml
file seemed to work. I also added "PyPI" as source for the "darwin" source, thus I don't know which of them did the trick but .. 🤷
perhaps you had previously made changes but forgot to hit "save"...
well anyway: I guess either provide a repro or close this out, please
It looks like it is adding torch-gpu-linux
twice because it is configured in the poetry config as a repository and the pyproject.toml as a source. Poetry merges these 2 at run time and that is probably why you are running into this specific issue. Remove it from the poetry config and try again.
It looks like it is adding
torch-gpu-linux
twice because it is configured in the poetry config as a repository and the pyproject.toml as a source. Poetry merges these 2 at run time and that is probably why you are running into this specific issue. Remove it from the poetry config and try again.
Where is the poetry config? I have only modified the pyproject.toml
I always forget where it is but it doesn't matter, you can modify and see the contents using the 'poetry config' command.
'poetry config --unset repositories.
Description
When releasing some code we have a system which step 1 is to run a unittest. If that passes, the code is published to our internal packages such that we can use them in production. The code for the unittest/publish is
The issue is that the publish part fails when I want to include pytorch with CUDA, thus I have to specify where to get the CUDA-torch from using the
tool.poetry.source
block. The publish part throws the warning/errorand exists with status 1, making the entire pipeline failing since the package cannot be published.
It seems like the repo specified in
tool.poetry.source
is being added twice, thus failing on the second one.Workarounds
Not in the .toml-file.
The way we work around it later on, is to skip the torch-part completely and then install it manually later on when the package is downloaded (which easily can lead to bugs).
Poetry Installation Method
pip
Operating System
It is run in a docker-container
Poetry Version
1.8.3
Poetry Configuration
Python Sysconfig
No response
Example pyproject.toml
Poetry Runtime Logs