-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: add support for HF_HUB_USER_AGENT_ORIGIN to add user-agent Origin field in Hub requests. #3061
base: main
Are you sure you want to change the base?
Conversation
…in field in Hub requests.
Dockerfile.neuron
Outdated
@@ -18,7 +18,7 @@ RUN apt-get update -y \ | |||
&& rm -rf /var/lib/apt/lists/* \ | |||
&& apt-get clean | |||
|
|||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.80.1 --profile minimal -y | |||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.84.0 --profile minimal -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use rust-toolchain.toml
:
COPY rust-toolchain.toml rust-toolchain.toml
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain none
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also not pipe anything into sh
while we're at it, but there are unfortunately a lot of these occurrences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure of what would be the best way to avoid the pipe. rustup-init
checks the architecture to download the right installer which we need to do. We could copy rustup-init
in the repo and add a check for rust-init
signature for each architecture but needs to be updated for each update. Do you have other ideas in mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
Adds support for HF_HUB_USER_AGENT_ORIGIN to add user-agent Origin field in Hub requests.
Useful to track collabs.