-
Notifications
You must be signed in to change notification settings - Fork 127
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
Which protobuf version does USE_ONNX require/support? #943
Labels
Comments
I don't know which versions are supported, but this may be potentially helpful: #900 (comment) |
I did some investigation into this. It requires v3.6.0 to match sentencepiece. https://github.com/protocolbuffers/protobuf/releases/tag/v3.6.0 I added this to my docker config to deal with it: # Get the header files for the protobuf version that matches sentencepiece in Marian.
# e.g. if the marian build complains about the C++ define: GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3006001
# This 3006001 maps to version v3.6.1. This checkout will need to change.
RUN git clone --branch v3.6.1.3 --single-branch https://github.com/protocolbuffers/protobuf.git && \
rm -rf /usr/include/google && \
ln -s $(pwd)/protobuf/src/google /usr/include
# Get the correct version of the Protobuf Compiler.
#
# protoc-3.6.1-linux-x86_64.zip
# ├── bin
# │ └── protoc
# └── include
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip && \
unzip protoc-3.6.1-linux-x86_64.zip -d protoc && \
rm protoc-3.6.1-linux-x86_64.zip && \
mv protoc/bin/protoc $BIN
RUN git clone https://github.com/marian-nmt/marian-dev.git marian-dev
# Re-build the onnx model definitions with the correct version of
RUN cd marian-dev/src/3rd_party/onnx/protobuf && \
${BIN}/protoc onnx-ml.proto --cpp_out .
|
Actually, this needs the library built and linked as well. Something like:
compile-protoc.sh #!/bin/bash
set -ex
##
# Usage: ./compile-protoc.sh ./protobuf
#
test -v BIN
# This follows the instructions from: https://github.com/protocolbuffers/protobuf/blob/v3.14.0/src/README.md
cd $1
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
make install
ldconfig # refresh shared library cache.
# Now that we're done, copy the bin.
cp ./src/protoc "${BIN}"
# Link in the includes.
ln -s $(pwd)/src/google /usr/include/google |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When trying to install marian with
-DUSE_ONNX
, it didn't compile.Dependencies Installation
With a fresh ubuntu instance:
Ubuntu version:
Context
Marian version: v1.11.0
CMake command:
The text was updated successfully, but these errors were encountered: