Skip to content

Commit 9f24aee

Browse files
committed
Fix Docker image (use Node 22)
1 parent cdfd3ec commit 9f24aee

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ FROM ubuntu:22.04
22

33
RUN apt-get update -y
44
RUN apt-get install -y curl xvfb
5-
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
5+
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
66
RUN apt-get install -y nodejs
7-
# Extra packages are needed to build `gl` library on arm64 architecture (not needed on amd64 aka x86_64):
8-
RUN test "$(arch)" = "x86_64" || apt-get install -y python-is-python3 pkg-config build-essential libxi-dev libglew-dev
7+
RUN apt-get install -y python-is-python3 pkg-config build-essential libxi-dev libglew-dev
98

109
RUN mkdir -p /surface-calculator
1110
WORKDIR /surface-calculator

src/export.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import { Unzip } from 'molstar/lib/commonjs/mol-util/zip/zip';
1414

1515

1616
/** Export current 3D canvas geometry and return as ZIP data (exported mesh vertices might be shifted by a constant vector!) */
17-
async function exportGeometry(plugin: PluginContext): Promise<Buffer<ArrayBuffer>> {
17+
async function exportGeometry(plugin: PluginContext): Promise<ArrayBuffer> {
1818
plugin.canvas3d?.commit(true); // need to commit canvas3d before it is exported
1919
const geo = new GeometryControls(plugin);
2020
geo.behaviors.params.next({ format: 'obj' });
2121
const data = await geo.exportGeometry();
2222
const buffer = await data.blob.arrayBuffer();
23-
return Buffer.from(buffer);
23+
return buffer;
2424
}
2525

2626
/** Export current 3D canvas geometry to individual .mtl and .obj files (these file extensions will be added to `filename`).

src/surface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function computeSurface(plugin: PluginContext, structureRef: Struct
5959
if (!structure.data) throw new Error('structure.data is undefined');
6060
const labelAsymIds = getPolymerLabelAsymIds(structure.data, structureRef.authChainId);
6161

62-
checkStructureAssemblyId(plugin.state.data.selectQ(q => q.byRef(structure.ref)).at(0), structureRef.assemblyId);
62+
checkStructureAssemblyId(plugin.state.data.selectQ(q => q.byRef(structure.ref))[0], structureRef.assemblyId);
6363

6464
const expr = MolScriptBuilder.struct.generator.atomGroups({
6565
'chain-test': MolScriptBuilder.core.set.has([

0 commit comments

Comments
 (0)