-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
building docker builds for c-wrapper
- Loading branch information
1 parent
87cb5a9
commit bc22004
Showing
2 changed files
with
37 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Use an official Rust image | ||
FROM rust:1.83-slim | ||
|
||
# Install necessary tools | ||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
build-essential \ | ||
libssl-dev \ | ||
pkg-config \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy the project files into the container | ||
COPY . . | ||
|
||
# Download ONNX Runtime 1.20.0 | ||
RUN wget https://github.com/microsoft/onnxruntime/releases/download/v1.20.0/onnxruntime-linux-x64-1.20.0.tgz \ | ||
&& tar -xvf onnxruntime-linux-x64-1.20.0.tgz \ | ||
&& mv onnxruntime-linux-x64-1.20.0 /onnxruntime | ||
|
||
# # Download ONNX Runtime 1.16.0 | ||
# RUN wget https://github.com/microsoft/onnxruntime/releases/download/v1.16.0/onnxruntime-linux-x64-1.16.0.tgz \ | ||
# && tar -xvf onnxruntime-linux-x64-1.16.0.tgz \ | ||
# && mv onnxruntime-linux-x64-1.16.0 /onnxruntime | ||
|
||
# Set the ONNX Runtime library path | ||
ENV ORT_LIB_LOCATION=/onnxruntime/lib | ||
ENV LD_LIBRARY_PATH=$ORT_LIB_LOCATION:$LD_LIBRARY_PATH | ||
|
||
# Clean and build the Rust project | ||
RUN cargo clean | ||
RUN cargo build --features tensorflow-tests | ||
|
||
# Run the tests | ||
CMD ["cargo", "test", "--features", "tensorflow-tests"] |
Empty file.