Skip to content

Commit

Permalink
add new tools
Browse files Browse the repository at this point in the history
  • Loading branch information
sxlijin committed Aug 7, 2024
1 parent 750ea1d commit 344e801
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 0 deletions.
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
10 changes: 10 additions & 0 deletions integ-tests/python/docker-tests/python-3_10.Dockerfile
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
63 changes: 63 additions & 0 deletions tools/install
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 -
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
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

0 comments on commit 344e801

Please sign in to comment.