Skip to content

Commit 97699f9

Browse files
committed
feat: add installer of deps
1 parent a873a1a commit 97699f9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

cmd/project/functions.go

+20
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,26 @@ func startProject(networkVolumeId string) error {
294294
archivedVenvPath := path.Join(projectPathUuid, "dev-venv.tar.zst")
295295
fmt.Printf("Activating Python virtual environment %s on Pod %s\n", venvPath, projectPodId)
296296
sshConn.RunCommands([]string{
297+
fmt.Sprint(`
298+
DEPENDENCIES=("wget" "sudo" "lsof" "git" "rsync" "zstd" "jq" "inotify-tools")
299+
300+
function check_and_install_dependencies() {
301+
for dep in "${DEPENDENCIES[@]}"; do
302+
if ! command -v $dep &> /dev/null; then
303+
echo "$dep could not be found, attempting to install..."
304+
apt-get update && apt-get install -y $dep
305+
if [ $? -eq 0 ]; then
306+
echo "$dep installed successfully."
307+
else
308+
echo "Failed to install $dep."
309+
exit 1
310+
fi
311+
fi
312+
done
313+
314+
wget -qO- cli.runpod.net | sudo bash &> /dev/null
315+
}
316+
check_and_install_dependencies`),
297317
fmt.Sprintf(`
298318
if ! [ -f %s/bin/activate ]
299319
then

0 commit comments

Comments
 (0)