55# Create a non-root user with `uid=499`.
66RUN useradd -m -u 499 -s /bin/bash user && \
77 apt-get update && \
8- apt-get install --no-install-recommends -qq -y python3.12 -venv && \
9- apt-get clean -y
8+ apt-get install --no-install-recommends -qq -y python3.13 -venv && \
9+ apt-get clean -y && rm -rf /var/lib/apt/lists/*
1010
1111USER user
1212
@@ -17,7 +17,7 @@ WORKDIR /home/user
1717# but if you use Debian methods like `update-alternatives`
1818# it won't provide a `pip` which works easily and it isn't
1919# easy to know how system packages interact with pip packages
20- RUN python3.12 -m venv venv
20+ RUN python3.13 -m venv venv
2121
2222# So scripts installed from pip are in $PATH
2323ENV PATH="/home/user/venv/bin:$PATH"
@@ -30,17 +30,20 @@ COPY --chmod=755 docker/trimesh-setup /home/user/venv/bin
3030# # install things that need building
3131FROM base AS build
3232
33+ USER root
34+ # `xatlas` currently needs to compile on 3.13 from the sdist
35+ RUN apt-get update && \
36+ apt-get install --no-install-recommends -y python3.13-dev build-essential g++ && \
37+ apt-get clean -y && rm -rf /var/lib/apt/lists/*
38+ USER user
39+
3340# copy in essential files
3441COPY --chown=499 trimesh/ /home/user/trimesh
3542COPY --chown=499 pyproject.toml /home/user/
3643
3744# install trimesh into the venv
3845RUN pip install /home/user[easy]
3946
40- # install FCL from a hopefully temporary fork
41- # as the original `python-fcl` currently has broken wheels on PyPi
42- RUN pip install fclx
43-
4447# ###################################
4548# ## Build output image most things should run on
4649FROM base AS output
@@ -62,7 +65,7 @@ COPY --chown=499 pyproject.toml .
6265COPY --chown=499 ./.git ./.git/
6366
6467USER root
65- RUN trimesh-setup --install=test,gmsh,gltf_validator,llvmpipe,binvox,blender
68+ RUN trimesh-setup --install=test,gmsh,gltf_validator,llvmpipe,binvox,blender,build
6669USER user
6770
6871RUN blender --version
0 commit comments