Added more libraries for better model generation

This commit is contained in:
2025-05-21 10:29:55 +01:00
parent 5b7244d533
commit d605fdaab2
2 changed files with 11 additions and 3 deletions

View File

@@ -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 .

View File

@@ -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