Yang Gao

Results 34 comments of Yang Gao
trafficstars

在 https://github.com/criyle/go-judge/blob/master/cmd/executorserver/ws_executor/websocket.go#L145 145,150 和 166 都会在错误产生的时候输出 WARN 级别日志,或许可以改成 INFO 级别的

I did a fresh install of comfyUI without any modification or custom_node and confirms that the workflows worked before the macOS upgrade stops working. The command line argument `--cpu` helps...

I tried to upgrade to macOS 14.4.1 and it is still not working properly.

定义成 `*string` 类型的考虑是可以直接传递字面值来作为文件内容。通常来说文件也是以 UTF-8 编码的。在 go 中,如果定义的是 `[]byte` 来接受 json 值的话要经过 base64 的编码。 在大多数的情况下文件是由 `src` 来传递来自本机文件系统的文件,可以支持二进制文件。 FFI 有段时间没有更新过了,考虑到没有已知的使用者,可以借此机会更新接口实现。 从支持二进制编码来考虑的话,也许 gRPC 使用的 protobuf 可以作为备选的一种格式。使用 base64 编码的字符串在 json 中也可行。

在设计的时候,沙箱服务通常作为一个附属组件的方式和评测服务部署在同一个 host 或者是共享卷宗的 pod 里面。在 FFI 的使用情况下甚至是同一个进程。在这种部署下,测试数据是由 src 路径来提供,并且支持非 UTF-8 文件。 content 提供内容是为了自测这种使用示例,用来提供非持久化的测试数据。而在这种情况下,用户提供的数据通常来自于网页上的文本框并由 JSON 编码传递的 UTF-8 内容。 在这个设计下,让 Rest API 或者 FFI 来支持 content 传递非 UTF-8 文件似乎是一个伪需求。

现在在使用 WebSocket 作为 API 接口时,可以传递二进制数据给输入输出了。

It was not designed to be used behind a load balancer since it has local cache which is stateful. Since transmitting files was considered as a rather expensive operation, it...

You may check out the [demo](https://github.com/criyle/go-judger-demo) implementation that shows how judger deployed with sandbox, which receives the OJ task and processes compile and running calls to sandbox. In production environments...

> How would this work with 301 or 302? I believe [superagent](https://github.com/ladjs/superagent/blob/1c8338b2e0a3b8f604d08acc7f3cbe305be1e571/src/node/index.js#L1063-L1065) handles it silently before parser.

目前在沙箱环境中是完全没有网络访问的(包括本地环回地址 `127.0.0.1` 或者 `::1`)您可以 **在测试环境中** 尝试添加 `-net-share` 命令行参数使用主机的网络来测试以便分别是否造成故障的原因是沙箱没有网络。 此外,如果想调节沙箱内运行的用户,请将仓库中的 `mount.yaml` 拷贝到沙箱的工作目录或者使用 `-mount-conf` 参数指定该配置文件的位置。 其中 `uid: 1536` 可以手动更改为您期望的用户 id (使用非0值,0为root) 此外,报错内容尝试读取了 `/sys/devices/system` 内容,可以尝试在 `mount.yaml` 中挂载对应的主机目录,比如添加下面的控制项在列表的末尾: ```yaml - type: bind source: /sys/devices/system...