File tree Expand file tree Collapse file tree 4 files changed +7
-14
lines changed Expand file tree Collapse file tree 4 files changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
1414 --no-install-recommends \
1515 && rm -rf /var/lib/apt/lists/*
1616
17- # RUN python -m venv /venv
17+ RUN python -m venv /venv
1818# normall we do some uv here; but for simplicity lets not
19- # ENV PATH="/venv/bin:$PATH"
20- # RUN /venv/bin/python -m pip install pydantic
19+ ENV PATH="/venv/bin:$PATH"
20+ RUN /venv/bin/python -m pip install pydantic==2.11.7
2121
2222# install rust
2323RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
@@ -29,9 +29,6 @@ COPY ./component /component
2929# build pydantic whl
3030RUN bash /component/build_pydantic.sh
3131
32- # copy to venv location
33- # RUN cp -R /wasi_deps/pydantic_core /venv/lib/python3.13/site-packages/
34-
3532WORKDIR /component
3633
3734# build wasm
Original file line number Diff line number Diff line change @@ -14,17 +14,14 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
1414 --no-install-recommends \
1515 && rm -rf /var/lib/apt/lists/*
1616
17- # RUN python -m venv /venv
17+ RUN python -m venv /venv
1818# normall we do some uv here; but for simplicity lets not
19- # ENV PATH="/venv/bin:$PATH"
20- # RUN /venv/bin/python -m pip install pydantic
19+ ENV PATH="/venv/bin:$PATH"
20+ RUN /venv/bin/python -m pip install pydantic==2.11.7
2121
2222# install pydantic wasi to folder
2323RUN pip install --target /wasi_deps --platform any --platform wasi_0_0_0_wasm32 --python-version "3.13" --only-binary :all: --index-url https://benbrandt.github.io/wasi-wheels/ --extra-index-url https://pypi.org/simple --upgrade pydantic_core pydantic
2424
25- # copy to venv location
26- # RUN cp -R /wasi_deps/pydantic_core /venv/lib/python3.13/site-packages/
27-
2825RUN pip install componentize-py
2926COPY ./app /app
3027COPY ./component /component
Original file line number Diff line number Diff line change 33componentize-py -d main.wit -w hello bindings some-world
44
55cd /app
6- componentize-py -w hello -d /component/main.wit componentize --stub-wasi main -o /component/output.wasm -p . -p /wasi_deps
6+ componentize-py -w hello -d /component/main.wit componentize --stub-wasi main -o /component/output.wasm -p . -p /wasi_deps -p /venv/ ** /site-packages
Original file line number Diff line number Diff line change @@ -19,4 +19,3 @@ cargo run -- build pydantic-core 2.33.2 --python-versions py3-13
1919
2020# install wheel
2121pip install --target /wasi_deps --platform any --platform wasi_0_0_0_wasm32 --python-version " 3.13" --only-binary :all: ` find . -name \* cp313-cp313-wasi_0_0_0_wasm32.whl`
22- pip install --target /wasi_deps --platform any --platform wasi_0_0_0_wasm32 --python-version " 3.13" --only-binary :all: pydantic
You can’t perform that action at this time.
0 commit comments