Skip to content

Commit

Permalink
building docker builds for c-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellflitton committed Jan 9, 2025
1 parent 87cb5a9 commit bc22004
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions modules/c-wrapper/Dockerfile
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.

0 comments on commit bc22004

Please sign in to comment.