-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): makes share common env vars from dotenv file
- Loading branch information
1 parent
660f9d6
commit d6b6e68
Showing
8 changed files
with
39 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,18 @@ | ||
FROM mcr.microsoft.com/devcontainers/rust:dev-1-bookworm | ||
|
||
ARG TARGETPLATFORM | ||
ARG ONNXRUNTIME_VERSION | ||
ARG DENO_VERSION | ||
|
||
RUN apt-get update && apt-get install -y build-essential cmake libclang-dev lldb \ | ||
nodejs npm hyperfine | ||
|
||
COPY .env /tmp/.env | ||
COPY .devcontainer/install.sh /tmp/install.sh | ||
COPY scripts/install_onnx.sh /tmp/install_onnx.sh | ||
COPY scripts/download_models.sh /tmp/download_models.sh | ||
|
||
WORKDIR /tmp | ||
RUN ./install_onnx.sh $ONNXRUNTIME_VERSION $TARGETPLATFORM /usr/local/bin/libonnxruntime.so | ||
RUN ./download_models.sh | ||
RUN mkdir -p /etc/sb_ai && cp -r /tmp/models /etc/sb_ai/models | ||
|
||
ENV ORT_DYLIB_PATH=/usr/local/bin/libonnxruntime.so | ||
ENV SB_AI_MODELS_DIR=/etc/sb_ai/models | ||
|
||
# Ollama | ||
RUN curl -fsSL https://ollama.com/install.sh | sh | ||
|
||
# Deno | ||
ENV DENO_INSTALL=/deno | ||
RUN mkdir -p /deno \ | ||
&& curl -fsSL https://deno.land/install.sh | bash -s -- v$DENO_VERSION \ | ||
&& chown -R vscode /deno | ||
|
||
RUN /tmp/install.sh $TARGETPLATFORM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
TARGETPLATFORM=$1 | ||
|
||
export $(grep -v '^#' /tmp/.env | xargs) | ||
|
||
# ONNX Runtime | ||
/tmp/install_onnx.sh $ONNXRUNTIME_VERSION $TARGETPLATFORM /tmp/onnxruntime | ||
mv /tmp/onnxruntime/lib/libonnxruntime.so* /usr/lib | ||
/tmp/download_models.sh | ||
mkdir -p /etc/sb_ai && cp -r /tmp/models /etc/sb_ai/models | ||
|
||
# Ollama | ||
curl -fsSL https://ollama.com/install.sh | sh | ||
|
||
# Deno | ||
mkdir -p /deno | ||
curl -fsSL https://deno.land/install.sh | bash -s -- v$DENO_VERSION | ||
chown -R vscode /deno |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
GIT_V_TAG=0.1.0 | ||
ONNXRUNTIME_VERSION=1.19.2 | ||
DENO_VERSION=1.45.2 | ||
EDGE_RUNTIME_PORT=9998 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ while true; do | |
fi | ||
|
||
echo "Tests passed. Running again..." | ||
done | ||
done |