diff --git a/Dockerfile b/Dockerfile index f060e7c..540b8a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,10 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o server ./main.go FROM alpine:latest RUN apk update -RUN apk add blender +RUN apk add blender py3-pip +RUN pip install numpy scipy trimesh +RUN del py3-pip + WORKDIR /root/ COPY --from=builder /app/server . COPY main.py.tmpl . diff --git a/main.py.tmpl b/main.py.tmpl index 697bf97..9add732 100644 --- a/main.py.tmpl +++ b/main.py.tmpl @@ -1,4 +1,9 @@ -import bpy # type: ignore +import bmesh +import bpy +import mathutils +import numpy +import scipy +import trimesh {{.ModelCode}} @@ -6,7 +11,7 @@ import bpy # type: ignore def guarded_model() -> bpy.types.Object: try: - out = model() # type: ignore + out = model() if out is None: raise TypeError("Function `model` cannot return type `None`.") return out