1
1
FROM ubuntu:22.04 AS build_sdk
2
2
3
- ARG PG_VERSION
4
- ARG SDK_VERSION
3
+ ARG PG_VERSION=16.4
4
+ ARG SDK_VERSION=3.1.74.3bi
5
5
ARG DEBUG=false
6
6
ARG OBJDUMP=true
7
7
12
12
SYS_PYTHON=/usr/bin/python3 \
13
13
DEBUG=$DEBUG \
14
14
BUILDS=3.12 \
15
- EMFLAVOUR=latest
15
+ EMFLAVOUR=3.1.74
16
16
17
17
WORKDIR /workspace
18
18
@@ -26,53 +26,43 @@ RUN \
26
26
make build-essential wget lz4 bzip2 pv curl
27
27
28
28
# Download the python-wasm-sdk source for the given version
29
- RUN git clone --depth 1 --branch ${SDK_VERSION} https://github.com/pygame-web/python-wasm-sdk.git
29
+ # RUN git clone --depth 1 --branch ${SDK_VERSION} https://github.com/pygame-web/python-wasm-sdk.git
30
+ RUN git clone --depth 1 https://github.com/electric-sql/portable-sdk.git
30
31
31
- # Remove third party libraries that are not necessary for PGLite
32
- RUN cd ./python-wasm-sdk/sources.wasm && rm assimp.sh bullet3.sh ode.sh
32
+ WORKDIR /workspace/portable-sdk/python-wasm-sdk
33
33
34
34
# Make python-wasm-sdk
35
- RUN cd ./python-wasm-sdk && chmod +x ./ python-wasm-sdk.sh && bash -c "./python-wasm-sdk.sh"
35
+ RUN chmod +x python-wasm-sdk.sh
36
36
37
+ RUN bash -c "./python-wasm-sdk.sh"
37
38
38
39
FROM ubuntu:22.04
39
40
40
- ARG PG_VERSION
41
- ARG SDK_VERSION
41
+ # Install dependencies to build postgres wasm
42
+ RUN \
43
+ apt-get update &&\
44
+ apt-get install -y lz4 wget pv bash bzip2 python3 build-essential libreadline-dev zlib1g-dev bison flex &&\
45
+ apt-get clean
46
+
47
+ ARG PG_VERSION=16.4
48
+ ARG SDK_VERSION=3.1.74.3bi
42
49
ARG DEBUG=false
43
50
ARG OBJDUMP=true
44
51
45
52
ENV \
46
53
PG_VERSION=$PG_VERSION \
47
54
SDK_VERSION=$SDK_VERSION \
48
- SDK_ARCHIVE=python3.12-wasm-sdk-Ubuntu-22.04.tar \
55
+ SDK_ARCHIVE=python3.12-wasm-sdk-Ubuntu-22.04.tar.lz4 \
49
56
SDKROOT=/opt/python-wasm-sdk \
50
57
SYS_PYTHON=/usr/bin/python3 \
51
58
PGROOT=/tmp/pglite \
52
59
DEBUG=$DEBUG \
53
60
OBJDUMP=$OBJDUMP
54
61
55
- WORKDIR /workspace
56
-
57
- COPY --from=0 /tmp/sdk /tmp/sdk
58
-
59
- ENV SDK_VERSION=3.1.74.2bi
60
- ENV WASI_SDK_VERSION=24.0.5
61
- ENV SDK_ARCHIVE=python3.13-wasm-sdk-Ubuntu-22.04.tar.lz4
62
- ENV WASI_SDK_ARCHIVE=python3.13-wasi-sdk-Ubuntu-22.04.tar.lz4
63
-
64
- # Install dependencies to build postgres wasm
65
- RUN \
66
- apt-get update &&\
67
- apt-get install -y lz4 wget pv bash curl bzip2 python3 build-essential libreadline-dev zlib1g-dev bison flex git curl &&\
68
- apt-get clean
69
-
70
- RUN curl -sL --retry 5 https://github.com/pygame-web/python-wasm-sdk/releases/download/$SDK_VERSION/$SDK_ARCHIVE | tar xvP --use-compress-program=lz4 | pv -p -l -s 46000 >/dev/null
71
- RUN curl -sL --retry 5 https://github.com/pygame-web/python-wasi-sdk/releases/download/$WASI_SDK_VERSION/$WASI_SDK_ARCHIVE | tar xvP --use-compress-program=lz4 | pv -p -l -s 23000 >/dev/null
62
+ COPY --from=build_sdk /tmp/sdk /tmp/sdk
72
63
73
- # Extract SDK
74
- RUN cd / && tar xvf /tmp/sdk/${SDK_ARCHIVE} | pv -p -l -s 24400 >/dev/null
64
+ RUN tar --use-compress-program=lz4 -xvf /tmp/sdk/${SDK_ARCHIVE} -C /
75
65
76
- # Clean up packaged SDK
77
- RUN rm -rf /tmp/sdk
66
+ RUN rm -r /tmp/sdk
78
67
68
+ WORKDIR /workspace
0 commit comments