[PR #181] feat: add uv runner #190

Open
opened 2026-02-16 09:19:48 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-sandbox/pull/181
Author: @gouzil
Created: 8/2/2025
Status: 🔄 Open

Base: mainHead: feat/add_uv_runner


📝 Commits (3)

📊 Changes

31 files changed (+1136 additions, -6 deletions)

View changed files

📝 build/build_amd64.sh (+4 -0)
📝 build/build_arm64.sh (+4 -0)
📝 cmd/dependencies/init.go (+8 -0)
cmd/lib/uv/main.go (+13 -0)
📝 conf/config.yaml (+1 -0)
📝 docker/generate.sh (+2 -0)
📝 docker/templates/production.dockerfile (+2 -0)
📝 docker/templates/test.dockerfile (+7 -0)
📝 docker/versions.yaml (+1 -0)
📝 internal/controller/run.go (+10 -4)
internal/core/lib/uv/add_seccomp.go (+66 -0)
📝 internal/core/runner/types/runner_options.go (+2 -1)
internal/core/runner/uv/.gitignore (+1 -0)
internal/core/runner/uv/env.go (+51 -0)
internal/core/runner/uv/env.sh (+61 -0)
internal/core/runner/uv/prescript.py (+52 -0)
internal/core/runner/uv/setup.go (+63 -0)
internal/core/runner/uv/uv.go (+194 -0)
internal/core/runner/uv/uv.h (+81 -0)
internal/service/uv.go (+51 -0)

...and 11 more files

📄 Description

motivation

I need a solution that can install dependency packages in real time, and I don't want it to cause dependency package conflicts.

feat

This pull request introduces support for a new uv1 runtime environment in the dify-sandbox project. The changes include adding build scripts, runtime initialization, dependency management, and configuration updates to integrate the UV runtime alongside existing Python and Node.js environments.

known issue

23.85 === RUN   TestUvExec
23.86     uv_malicious_test.go:43: error: exit status 159
23.86         
23.86 --- FAIL: TestUvExec (0.01s)
23.86 === RUN   TestUvRunCommand
23.88     uv_malicious_test.go:60: error: exit status 159
23.88         
23.88 --- FAIL: TestUvRunCommand (0.02s)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-sandbox/pull/181 **Author:** [@gouzil](https://github.com/gouzil) **Created:** 8/2/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/add_uv_runner` --- ### 📝 Commits (3) - [`75b9323`](https://github.com/langgenius/dify-sandbox/commit/75b9323becd083d8d436b7b7c2f650b6b9ddf6f2) feat: add uv runner - [`8a34a1b`](https://github.com/langgenius/dify-sandbox/commit/8a34a1b8c4380e4633eef2eb3cbeff9dd094fa0a) clean code - [`cf5472e`](https://github.com/langgenius/dify-sandbox/commit/cf5472ecbc6c46ba307b9811ea420ed6cf406850) fix: `UvMirrorURL` specified error ### 📊 Changes **31 files changed** (+1136 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `build/build_amd64.sh` (+4 -0) 📝 `build/build_arm64.sh` (+4 -0) 📝 `cmd/dependencies/init.go` (+8 -0) ➕ `cmd/lib/uv/main.go` (+13 -0) 📝 `conf/config.yaml` (+1 -0) 📝 `docker/generate.sh` (+2 -0) 📝 `docker/templates/production.dockerfile` (+2 -0) 📝 `docker/templates/test.dockerfile` (+7 -0) 📝 `docker/versions.yaml` (+1 -0) 📝 `internal/controller/run.go` (+10 -4) ➕ `internal/core/lib/uv/add_seccomp.go` (+66 -0) 📝 `internal/core/runner/types/runner_options.go` (+2 -1) ➕ `internal/core/runner/uv/.gitignore` (+1 -0) ➕ `internal/core/runner/uv/env.go` (+51 -0) ➕ `internal/core/runner/uv/env.sh` (+61 -0) ➕ `internal/core/runner/uv/prescript.py` (+52 -0) ➕ `internal/core/runner/uv/setup.go` (+63 -0) ➕ `internal/core/runner/uv/uv.go` (+194 -0) ➕ `internal/core/runner/uv/uv.h` (+81 -0) ➕ `internal/service/uv.go` (+51 -0) _...and 11 more files_ </details> ### 📄 Description ## motivation I need a solution that can install dependency packages in real time, and I don't want it to cause dependency package conflicts. ## feat This pull request introduces support for a new `uv`[^1] runtime environment in the `dify-sandbox` project. The changes include adding build scripts, runtime initialization, dependency management, and configuration updates to integrate the UV runtime alongside existing Python and Node.js environments. ## known issue ```console 23.85 === RUN TestUvExec 23.86 uv_malicious_test.go:43: error: exit status 159 23.86 23.86 --- FAIL: TestUvExec (0.01s) 23.86 === RUN TestUvRunCommand 23.88 uv_malicious_test.go:60: error: exit status 159 23.88 23.88 --- FAIL: TestUvRunCommand (0.02s) ``` [^1]: https://docs.astral.sh/uv/ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 09:19:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-sandbox#190