From 49559ebee6baf37f009e38dce028a98df56c07de Mon Sep 17 00:00:00 2001 From: vishalkadam47 Date: Sun, 8 Dec 2024 06:27:34 +0530 Subject: [PATCH 1/3] fix: update GPU setup command to use sudo and add error handling --- packages/server/src/utils/gpu-setup.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/server/src/utils/gpu-setup.ts b/packages/server/src/utils/gpu-setup.ts index ce60adf1..0b49dc6c 100644 --- a/packages/server/src/utils/gpu-setup.ts +++ b/packages/server/src/utils/gpu-setup.ts @@ -303,7 +303,7 @@ const setupLocalServer = async (daemonConfig: any) => { await fs.writeFile(configFile, JSON.stringify(daemonConfig, null, 2)); const setupCommands = [ - `pkexec sh -c ' + `sudo sh -c ' cp ${configFile} /etc/docker/daemon.json && mkdir -p /etc/nvidia-container-runtime && sed -i "/swarm-resource/d" /etc/nvidia-container-runtime/config.toml && @@ -314,7 +314,14 @@ const setupLocalServer = async (daemonConfig: any) => { `rm ${configFile}`, ].join(" && "); - await execAsync(setupCommands); + try { + await execAsync(setupCommands); + } catch (error) { + console.error("Setup failed:", error); + throw new Error( + "Failed to configure GPU support. Please ensure you have sudo privileges and try again.", + ); + } }; const addGpuLabel = async (nodeId: string, serverId?: string) => { From bc55fde6d68d8f7e5eacab1af4d2b16dd53e30fc Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Tue, 10 Dec 2024 02:38:50 -0600 Subject: [PATCH 2/3] fix: pin nixpacks version --- .circleci/config.yml | 6 +++--- Dockerfile | 2 ++ packages/server/src/setup/server-setup.ts | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dd91309d..ff3a65c9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,14 +99,14 @@ workflows: only: - main - canary - - 379-preview-deployment + - fix/nixpacks-version - build-arm64: filters: branches: only: - main - canary - - 379-preview-deployment + - fix/nixpacks-version - combine-manifests: requires: - build-amd64 @@ -116,4 +116,4 @@ workflows: only: - main - canary - - 379-preview-deployment + - fix/nixpacks-version diff --git a/Dockerfile b/Dockerfile index 74b70db0..51be6469 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,6 +48,8 @@ RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh && rm # Install Nixpacks and tsx # | VERBOSE=1 VERSION=1.21.0 bash + +ARG NIXPACKS_VERSION=1.29.1 RUN curl -sSL https://nixpacks.com/install.sh -o install.sh \ && chmod +x install.sh \ && ./install.sh \ diff --git a/packages/server/src/setup/server-setup.ts b/packages/server/src/setup/server-setup.ts index 81e49779..55ebdc6b 100644 --- a/packages/server/src/setup/server-setup.ts +++ b/packages/server/src/setup/server-setup.ts @@ -522,7 +522,8 @@ const installNixpacks = () => ` if command_exists nixpacks; then echo "Nixpacks already installed ✅" else - VERSION=1.28.1 bash -c "$(curl -fsSL https://nixpacks.com/install.sh)" + export NIXPACKS_VERSION=1.29.1 + bash -c "$(curl -fsSL https://nixpacks.com/install.sh)" echo "Nixpacks version 1.28.1 installed ✅" fi `; From 69a3583717b6684c4f922dd1d7ce6d650409a2ba Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Tue, 10 Dec 2024 02:39:31 -0600 Subject: [PATCH 3/3] chore: bump version --- apps/dokploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index 60a05a80..292d3efb 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -1,6 +1,6 @@ { "name": "dokploy", - "version": "v0.14.0", + "version": "v0.14.1", "private": true, "license": "Apache-2.0", "type": "module",