-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: increase range of python FFI support #870
Changes from all commits
9fa15ff
31e4d5f
2c7a3bc
1b14aee
7b53515
e4e109c
9ea29c5
ac05768
1fc93c5
de4a7d7
bff1a65
2950dac
540f362
9604778
d341004
af894c6
750ea1d
344e801
6d3e9a3
9d00bcc
fa227e4
5623379
9280e83
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# https://github.com/rust-lang/cargo/issues/8607 | ||
[target.x86_64-unknown-linux-musl] | ||
rustflags = ["-C", "target-feature=-crt-static"] | ||
[target.aarch64-unknown-linux-musl] | ||
linker = "aarch64-linux-musl-gcc" | ||
rustflags = ["-C", "target-feature=-crt-static"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM quay.io/pypa/manylinux2014_aarch64 as base | ||
RUN yum install python3-pip -y | ||
|
||
ADD ../baml_py-0.53.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ./baml_py-0.53.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | ||
RUN pip3 install ./baml_py-0.53.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | ||
|
||
ENV RUST_LOG=trace | ||
RUN baml-cli --help |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM ghcr.io/rust-cross/rust-musl-cross:aarch64-musl as base | ||
RUN yum install python3-pip -y | ||
|
||
ADD ../baml_py-0.53.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ./baml_py-0.53.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | ||
RUN pip3 install ./baml_py-0.53.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | ||
|
||
ENV RUST_LOG=trace | ||
RUN baml-cli --help | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ARG PYTHON_VERSION=3.10 | ||
FROM python:${PYTHON_VERSION} as base | ||
|
||
RUN apt-get update | ||
|
||
ADD ../baml_py-0.53.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ./baml_py-0.53.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | ||
RUN pip install ./baml_py-0.53.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | ||
|
||
ENV RUST_LOG=trace | ||
RUN baml-cli --help | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Add a newline at the end of the file for better formatting. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env /bin/bash | ||
|
||
set -euo pipefail | ||
|
||
show_help() { | ||
cat <<EOF | ||
Usage: install [dep ...] | ||
|
||
Options: | ||
--help Display this help message and exit. | ||
EOF | ||
} | ||
|
||
_help_mode=0 | ||
_watch_mode=0 | ||
_test_mode=0 | ||
|
||
while [ $# -gt 0 ]; do | ||
case "$1" in | ||
--help) | ||
_help_mode=1 | ||
shift | ||
;; | ||
poetry) | ||
install_poetry=1 | ||
shift | ||
;; | ||
rustup) | ||
install_rustup=1 | ||
shift | ||
;; | ||
--) # End of all options | ||
shift | ||
break | ||
;; | ||
*) # No more options | ||
break | ||
;; | ||
esac | ||
done | ||
|
||
if [ "$_help_mode" -eq 1 ]; then | ||
show_help | ||
exit 0 | ||
fi | ||
|
||
if [ "${install_poetry:-0}" -eq 1 ]; then | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Consider adding error handling for the Poetry installation command to catch and report any issues during the installation process. |
||
echo 'export PATH=$HOME/.local/bin:$PATH' | ||
path_add='$HOME/.local/bin:'"${path_add:-}" | ||
fi | ||
|
||
if [ "${install_rustup:-0}" -eq 1 ]; then | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Consider adding error handling for the Rustup installation command to catch and report any issues during the installation process. |
||
path_add='$HOME/.cargo/bin:'"${path_add:-}" | ||
fi | ||
|
||
if [ -n "${path_add:-}" ]; then | ||
echo | ||
echo -e "\033[36mRun the following to add the above installed deps to your PATH:\033[0m" | ||
echo | ||
echo "export PATH=$path_add:"'$PATH' | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Add a newline at the end of the file for better formatting.