瀏覽代碼

fix: add PATH to uv installation command (#90)

* chore: Add build-essential package to local dockerfile

* fix: add PATH to uv installation
Yeuoly 4 月之前
父節點
當前提交
fb903d6b8d
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      docker/local.dockerfile
  2. 1 1
      internal/core/plugin_manager/local_runtime/environment_python.go

+ 1 - 1
docker/local.dockerfile

@@ -33,7 +33,7 @@ WORKDIR /app
 ARG PLATFORM=local
 ARG PLATFORM=local
 
 
 # Install python3.12 if PLATFORM is local
 # Install python3.12 if PLATFORM is local
-RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl python3.12 python3.12-venv python3.12-dev python3-pip ffmpeg \
+RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl python3.12 python3.12-venv python3.12-dev python3-pip ffmpeg build-essential \
     && apt-get clean \
     && apt-get clean \
     && rm -rf /var/lib/apt/lists/* \
     && rm -rf /var/lib/apt/lists/* \
     && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1;
     && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1;

+ 1 - 1
internal/core/plugin_manager/local_runtime/environment_python.go

@@ -128,7 +128,7 @@ func (p *LocalPluginRuntime) InitPythonEnvironment() error {
 
 
 	virtualEnvPath := path.Join(p.State.WorkingPath, ".venv")
 	virtualEnvPath := path.Join(p.State.WorkingPath, ".venv")
 	cmd = exec.CommandContext(ctx, uvPath, args...)
 	cmd = exec.CommandContext(ctx, uvPath, args...)
-	cmd.Env = append(cmd.Env, "VIRTUAL_ENV="+virtualEnvPath)
+	cmd.Env = append(cmd.Env, "VIRTUAL_ENV="+virtualEnvPath, "PATH="+os.Getenv("PATH"))
 	cmd.Dir = p.State.WorkingPath
 	cmd.Dir = p.State.WorkingPath
 
 
 	// get stdout and stderr
 	// get stdout and stderr