-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
926e86f
commit cb27919
Showing
5 changed files
with
121 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
PIO=$HOME/.platformio/penv/bin/pio | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
if [[ "${TRACE-0}" == "1" ]]; then | ||
set -o xtrace | ||
fi | ||
|
||
help_function() { | ||
echo "Usage: $0 [OPTION]" | ||
echo | ||
echo "This script checks and installs PlatformIO and Docker if not present." | ||
echo | ||
echo "-h Show this help message and exit." | ||
} | ||
|
||
install_cog() { | ||
if ! command -v cog &> /dev/null; then | ||
echo "Cog not detected. Installing..." | ||
sudo curl -o /usr/local/bin/cog -L "https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)" | ||
sudo chmod +x /usr/local/bin/cog | ||
else | ||
echo "Cog is already installed." | ||
fi | ||
} | ||
|
||
main() { | ||
if [[ "$#" -gt 0 && "$1" == "-h" ]]; then | ||
help_function | ||
exit 0 | ||
fi | ||
|
||
install_cog | ||
cog build | ||
docker run -d -p 80:5000 r8.im/jimothyjohn/latentblending | ||
} | ||
|
||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
PIO=$HOME/.platformio/penv/bin/pio | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
if [[ "${TRACE-0}" == "1" ]]; then | ||
set -o xtrace | ||
fi | ||
|
||
help_function() { | ||
echo "Usage: $0 [OPTION]" | ||
echo | ||
echo "This script checks and installs PlatformIO and Docker if not present." | ||
echo | ||
echo "-h Show this help message and exit." | ||
} | ||
|
||
install_cog() { | ||
if ! command -v cog &> /dev/null; then | ||
echo "Cog not detected. Installing..." | ||
sudo curl -o /usr/local/bin/cog -L "https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)" | ||
sudo chmod +x /usr/local/bin/cog | ||
else | ||
echo "Cog is already installed." | ||
fi | ||
} | ||
|
||
main() { | ||
if [[ "$#" -gt 0 && "$1" == "-h" ]]; then | ||
help_function | ||
exit 0 | ||
fi | ||
|
||
install_cog | ||
cog build | ||
docker run -d -p 80:5000 --gpus all r8.im/jimothyjohn/latentblending | ||
} | ||
|
||
main "$@" |