-
Notifications
You must be signed in to change notification settings - Fork 503
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
Install Script #1558
base: main
Are you sure you want to change the base?
Install Script #1558
Conversation
Signed-off-by: Chigozie Nri <chigozie@gmail.com>
77fb19a
to
7087a69
Compare
You can run an install script which will download and install the latest release of Cog: | ||
``` | ||
# via curl | ||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/replicate/cog/main/tools/install.sh)" |
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.
Would curl {URL} | sh
also work?
That might be a bit cleaner, but maybe there are some tradeoffs there?
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.
Could also use a short URL like https://cog.run/installer
with a redirect to this longer URL.
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.
curl -fsSL https://cog.run/installer | sh
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.
Yes, for some reason I thought the construction using a pipe wouldn't work with wget, but I just tested and it does.
(N.B. Part of the motivation for making this script in the first place was that my friend tried to use the existing instructions and one of his frustrations was that Ubuntu didn't have curl installed by default.)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/replicate/cog/main/tools/install.sh)" | ||
# or via wget: | ||
sh -c "$(wget -qO- https://raw.githubusercontent.com/replicate/cog/main/tools/install.sh)" | ||
# or via fetch: | ||
sh -c "$(fetch -o - https://raw.githubusercontent.com/replicate/cog/main/tools/install.sh)" |
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.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/replicate/cog/main/tools/install.sh)" | |
# or via wget: | |
sh -c "$(wget -qO- https://raw.githubusercontent.com/replicate/cog/main/tools/install.sh)" | |
# or via fetch: | |
sh -c "$(fetch -o - https://raw.githubusercontent.com/replicate/cog/main/tools/install.sh)" | |
curl -fsSL https://cog.run/installer | sh | |
# or via wget: | |
wget -qO- https://cog.run/installer | sh | |
# or via fetch: | |
fetch -o - https://cog.run/installer | sh |
@zeke I don't know where to make a PR to update cog.run, do you know? This does look nicer, though.
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.
@chigozienri I think we'd need to set up a custom route handler for that in CloudFlare
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 set that up:
$ curl -I "https://cog.run/installer"
HTTP/2 301
date: Tue, 19 Mar 2024 02:49:41 GMT
location: https://raw.githubusercontent.com/replicate/cog/main/tools/install.sh
Signed-off-by: Chigozie Nri <chigozie@gmail.com>
This reverts commit 311ea58. Signed-off-by: Chigozie Nri <chigozie@gmail.com>
Proposal for install.sh to reduce friction when installing cog
Run as follows:
See Slack comments here https://replicatehq.slack.com/archives/C05600FDYTE/p1709142996116999