Skip to content

fix(sec): torch.load 默认禁用 pickle 反序列化 - 恶意 .pt/.pth 经 __reduce__ 钩子在加… #3

fix(sec): torch.load 默认禁用 pickle 反序列化 - 恶意 .pt/.pth 经 __reduce__ 钩子在加…

fix(sec): torch.load 默认禁用 pickle 反序列化 - 恶意 .pt/.pth 经 __reduce__ 钩子在加… #3

Workflow file for this run

name: 'Docker 镜像构建'
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
tags:
- 'v*' # 打 v0.1.0 等标签时自动构建并产出镜像
permissions:
contents: read
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: '构建 Docker 镜像'
run: |
docker build -t model-translator .
- name: '导出并上传镜像工件'
run: |
docker save model-translator | gzip > model-translator-image.tar.gz
- uses: actions/upload-artifact@v4
with:
name: 'model-translator-docker-image-${{ github.ref_name }}'
path: 'model-translator-image.tar.gz'
if-no-files-found: 'warn'
retention-days: 14