-
Notifications
You must be signed in to change notification settings - Fork 206
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
Proxy settings for a project #474
Comments
I think we should not include the proxy settings in the Pixi should already respect the |
Maybe a little bit of context on why I proposed this will help. I work in a team where most users are not comfortable in writing scripts and preparing the python environment. I found pixi very easy to prepare an environment for users to download a python script from our private github repo and just call the |
Hi all, I have a related issue or rather a comment on:
It seems like this is not the case when pypi packages are installed. I have commented in another issue (here) about my case but I guess it fits much better here. Usage of these proxy environment variables is quite common in university HPC systems such as ours and I'm not able to use pixi install --verbose
INFO pixi::config: Global config not found at /etc/pixi/config.toml
INFO pixi::config: Global config not found at /home/du23yow/.config/pixi/config.toml
INFO pixi::config: Global config not found at /home/du23yow/.config/pixi/config.toml
INFO pixi::config: Global config not found at /home/du23yow/.pixi/config.toml
INFO pixi::environment: verifying prefix location is unchanged, with prefix file: /home/du23yow/0000_gedixr_development/.pixi/envs/default/conda-meta/pixi_env_prefix
INFO pixi::lock_file::outdated: environment 'default' is out of date because it does not exist in the lock-file.
INFO pixi::lock_file::resolve: uv keyring provider is disabled
⠙ default:linux-64 [00:00:00] [────────────────────] 0/21 extracting pypi packages
⠉ default:osx-64 [00:00:00] [────────────────────] 0/13 extracting pypi packages × failed to download pypi name mapping
├─▶ Middleware error: File still doesn't exist
├─▶ File still doesn't exist
╰─▶ No such file or directory (os error 2) No problem at all when only conda-forge dependencies are listed in the file. Pixi version is |
Hello there, I same a similar-ish issue here. pixi.toml[project]
name = "hello-pixi-single-pypi-package"
version = "0.1.0"
description = "Add a short description here"
authors = ["Me"]
channels = ["https://my_corporate_artifactory_instance/art/conda"]
platforms = ["win-64"]
[pypi-options]
index-url = "https://my_corporate_artifactory_instance/art/api/pypi/my-pypi/simple/"
[tasks]
[dependencies]
python = "==3.11"
[pypi-dependencies]
rich = "*" Context
Expected behavior
Actual behavior
...and then, after multiple
Questions
UPDATE : I get the problem is closely related to parselmouth, the conda mapping runner. |
Well, after a few hours scratching my head, it seems I found a workaround 🤞 However, unless I misunderstand some underlying mechanics in pixi, the workaround appears counter-intuitive. In conda-pypi-map = { "https://my_corporate_artifactory_instance/art/conda" = "mappings.json" } ...and the { "rich": "rich" } ...and voilà, On a side note, in reference to #474 (comment), @maawoo, I tested different scenarios with and without proxy environment variables and those are properly propagated to |
@amirhosseindavoody, @maawoo, in regard to proxy settings, I agree with @baszalmstra ; using preexisting proxy environment variables (http_proxy, https_proxy, no_proxy) might just be the way to go. Now, based on my discoveries in #474 (comment), it seems application logic associated with In my situation, it's good news because direct Internet access to GH assets is prohibited in my corporate environment. However, I don't need any mappings ; alI I want is consume conda and pypi packages and control sources of truth using appropriate Which makes me think... is there a simpler configuration of some sort (a flag, environment variable or property in Any ideas, @baszalmstra ? |
Well, as a follow-up to #474 (comment), it appears a
...like... {} ...gets the job done to circumvent parselmouth online conda mapping checks. |
For future visitors, modify your [project]
...
channels = ["conda-forge", "pytorch"]
conda-pypi-map = { pytorch = "compressed_mapping.json", conda-forge = "compressed_mapping.json", nvidia = "compressed_mapping.json" }
... Note that Also as the above comment mentions, the |
Thanks @ernimd and @javs1979 for the workaround! |
You're not wrong, but you could host the map yourself or copy the map into the local file and then it would actually work. https://github.com/prefix-dev/parselmouth/blob/main/files/compressed_mapping.json A real fix would be a proper implementation of the purl spec. For which we've created a CEP(conda enhancement proposal): |
With this I can get the proxy to work for conda packages neatly. However, I still fail to get the pipy packages to resolve albeit setting: conda-pypi-map = { conda-forge = "compressed_mapping.json" } |
For me it only works when
setting the index-url 2x - once in the project settings and one more time in the project configuration - plus setting the empty mapping json. |
Problem description
Add settings for
http_proxy
andhttps_proxy
in project specificpixi.toml
files.The text was updated successfully, but these errors were encountered: