Skip to content

Commit

Permalink
Remove VERSION file to TRITON_VERSION (triton-inference-server#2425)
Browse files Browse the repository at this point in the history
This is needed because on windows (case insensitive file system) the
VERSION file was being picked up as the C++ <version> header which
causes build failures.
  • Loading branch information
deadeyegoodwin authored Jan 18, 2021
1 parent f50fafb commit abc566f
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.sdk
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ RUN rm -f /usr/bin/python && \

# Build the client library and examples
WORKDIR /workspace
COPY VERSION .
COPY TRITON_VERSION .
COPY build build
COPY src/clients src/clients
COPY src/core src/core
Expand All @@ -105,7 +105,7 @@ RUN mkdir builddir && cd builddir && \
-DTRITON_ENABLE_HTTP=ON ../build && \
make -j16 client
RUN cd install && \
export VERSION=`cat /workspace/VERSION` && \
export VERSION=`cat /workspace/TRITON_VERSION` && \
tar zcf /workspace/v$VERSION.clients.tar.gz *

# For CI testing need to install a test script.
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
# Build Triton Inference Server.
#

# By default build.py builds the Triton container. The VERSION file
# indicates the Triton version and TRITON_VERSION_MAP is used to
# By default build.py builds the Triton container. The TRITON_VERSION
# file indicates the Triton version and TRITON_VERSION_MAP is used to
# determine the corresponding container version and upstream container
# version (upstream containers are dependencies required by
# Triton). These versions may be overridden. See docs/build.md for
Expand Down Expand Up @@ -777,7 +777,7 @@ def create_dockerfile(ddir, dockerfile_name, argmap, backends):
WORKDIR /opt/tritonserver
RUN rm -fr /opt/tritonserver/*
COPY --chown=1000:1000 LICENSE .
COPY --chown=1000:1000 VERSION .
COPY --chown=1000:1000 TRITON_VERSION .
COPY --chown=1000:1000 --from=tritonserver_build /tmp/tritonbuild/install/bin/tritonserver bin/
COPY --chown=1000:1000 --from=tritonserver_build /tmp/tritonbuild/install/lib/libtritonserver.so lib/
'''
Expand Down Expand Up @@ -1113,7 +1113,7 @@ def container_build(backends, images):
type=str,
required=False,
help=
'The Triton version. If not specified defaults to the value in VERSION file.'
'The Triton version. If not specified defaults to the value in the TRITON_VERSION file.'
)
parser.add_argument(
'--container-version',
Expand Down Expand Up @@ -1225,9 +1225,9 @@ def container_build(backends, images):
FLAGS.filesystem = []

# Determine the versions. Start with Triton version, if --version
# is not explicitly specified read from VERSION file.
# is not explicitly specified read from TRITON_VERSION file.
if FLAGS.version is None:
with open('VERSION', "r") as vfile:
with open('TRITON_VERSION', "r") as vfile:
FLAGS.version = vfile.readline().strip()
# For other versions use the TRITON_VERSION_MAP unless explicitly
# given.
Expand Down
4 changes: 2 additions & 2 deletions build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ set(TRITON_BACKEND_REPO_TAG "main" CACHE STRING "Tag for triton-inference-server
set(TRITON_THIRD_PARTY_REPO_TAG "main" CACHE STRING "Tag for triton-inference-server/third_party repo")

# Version
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/../VERSION" TRITON_VERSION)
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/../TRITON_VERSION" TRITON_VERSION)

if(TRITON_ENABLE_METRICS AND NOT TRITON_ENABLE_STATS)
message(FATAL_ERROR "TRITON_ENABLE_METRICS=ON requires TRITON_ENABLE_STATS=ON")
Expand Down Expand Up @@ -369,7 +369,7 @@ ExternalProject_Add(google-cloud-cpp
)

#
# Build azure-storage-cpplite
# Build azure-storage-cpplite
#
ExternalProject_Add(azure-storage-cpplite
PREFIX azure-storage-cpplite
Expand Down
2 changes: 1 addition & 1 deletion qa/L0_client/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ else
fi

# Check wheels
WHLVERSION=`cat /workspace/VERSION | sed 's/dev/\.dev0/'`
WHLVERSION=`cat /workspace/TRITON_VERSION | sed 's/dev/\.dev0/'`
WHLS="tritonclient-${WHLVERSION}-py3-none-any.whl \
tritonclient-${WHLVERSION}-py3-none-manylinux1_x86_64.whl"
for l in $WHLS; do
Expand Down
2 changes: 1 addition & 1 deletion qa/common/check_copyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
'qa/L0_model_config/special_cases', 'qa/L0_perf_nomodel/baseline',
'qa/L0_perf_nomodel/legacy_baseline', 'qa/L0_warmup/raw_mug_data',
'src/clients/c++/library/cencode.c', 'src/clients/c++/library/cencode.h',
'src/clients/java', 'VERSION')
'src/clients/java', 'TRITON_VERSION')

COPYRIGHT_YEAR_RE0 = 'Copyright \\(c\\) (20[0-9][0-9]), NVIDIA CORPORATION. All rights reserved.'
COPYRIGHT_YEAR_RE1 = 'Copyright \\(c\\) (20[0-9][0-9])-(20[0-9][0-9]), NVIDIA CORPORATION. All rights reserved.'
Expand Down
2 changes: 1 addition & 1 deletion src/clients/c++/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if(WIN32)
else()
install(
FILES
${CMAKE_SOURCE_DIR}/../../VERSION
${CMAKE_SOURCE_DIR}/../../TRITON_VERSION
DESTINATION .
)

Expand Down
10 changes: 5 additions & 5 deletions src/clients/python/library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ if (NOT WIN32)
endif() # NOT WIN32
####################################

configure_file(../../../../VERSION VERSION COPYONLY)
configure_file(../../../../TRITON_VERSION TRITON_VERSION COPYONLY)
configure_file(LICENSE.txt LICENSE.txt COPYONLY)
configure_file(setup.py setup.py COPYONLY)
file(COPY requirements DESTINATION .)

set(WHEEL_DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/VERSION
set(WHEEL_DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/TRITON_VERSION
${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt
${CMAKE_CURRENT_BINARY_DIR}/setup.py
)

if(${TRITON_ENABLE_GRPC})
set(WHEEL_DEPENDS
set(WHEEL_DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/tritonclient/grpc
proto-py-library
grpc-py-library
Expand All @@ -64,7 +64,7 @@ if(${TRITON_ENABLE_GRPC})
endif() # TRITON_ENABLE_GRPC

if(${TRITON_ENABLE_HTTP})
set(WHEEL_DEPENDS
set(WHEEL_DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/tritonclient/http
${WHEEL_DEPENDS}
)
Expand Down
10 changes: 5 additions & 5 deletions src/clients/python/library/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ function main() {
exit 1
fi

if [[ ! -f "VERSION" ]]; then
echo "Could not find VERSION"
if [[ ! -f "TRITON_VERSION" ]]; then
echo "Could not find TRITON_VERSION"
exit 1
fi

VERSION=`cat VERSION`
VERSION=`cat TRITON_VERSION`
DEST="$1"
WHLDIR="$DEST/wheel"

Expand Down Expand Up @@ -104,15 +104,15 @@ function main() {
cp tritonclient/utils/libccudashm.so \
"${WHLDIR}/tritonclient/utils/cuda_shared_memory/."
fi

# Copies the pre-compiled perf_analyzer binary
if [ -f $3 ]; then
cp $3 "${WHLDIR}"
# Create a symbolic link for backwards compatibility
(cd $WHLDIR; ln -sf ./perf_analyzer perf_client)
fi
fi

cp LICENSE.txt "${WHLDIR}"
cp -r requirements "${WHLDIR}"
cp setup.py "${WHLDIR}"
Expand Down

0 comments on commit abc566f

Please sign in to comment.