Skip to content

Commit

Permalink
Github actions building fix (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
arition authored Aug 31, 2021
1 parent 8f13b29 commit 8be97a8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-prebuild-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: publish-prebuild
name: publish-prebuild-test

on:
push:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/scripts/install_cuda_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ echo "CUDA_PACKAGES ${CUDA_PACKAGES}"

PIN_FILENAME="cuda-ubuntu${UBUNTU_VERSION}.pin"
PIN_URL="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64/${PIN_FILENAME}"
APT_KEY_URL="http://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64/7fa2af80.pub"
REPO_URL="http://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64/"
CUDNN_REPO_URL="https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu${UBUNTU_VERSION}/x86_64/"
APT_KEY_URL="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64/7fa2af80.pub"
REPO_URL="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64"
CUDNN_REPO_URL="https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu${UBUNTU_VERSION}/x86_64"

echo "PIN_FILENAME ${PIN_FILENAME}"
echo "PIN_URL ${PIN_URL}"
Expand Down Expand Up @@ -153,5 +153,3 @@ nvcc -V
sudo apt-get install -y --no-install-recommends \
libcudnn8=${CUDNN_VERSION}-1+cuda${CUDA_MAJOR}.${CUDA_MINOR} \
libcudnn8-dev=${CUDNN_VERSION}-1+cuda${CUDA_MAJOR}.${CUDA_MINOR}

sudo apt-mark hold libcudnn7
2 changes: 0 additions & 2 deletions .github/workflows/scripts/install_cuda_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,3 @@ $env:CUDA_PATH = "$($CUDA_PATH)"
$env:CUDA_PATH_VX_Y = "$($CUDA_PATH_VX_Y)"
Write-Output "CUDA_PATH $($CUDA_PATH)"
Write-Output "CUDA_PATH_VX_Y $($CUDA_PATH_VX_Y)"

tree $CUDA_PATH /f
16 changes: 12 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,18 @@ target_link_libraries(${PROJECT_NAME} TorchVision::TorchVision)

target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB})

add_custom_command(TARGET torch-js POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_CURRENT_BINARY_DIR}/libtorch/lib"
$<TARGET_FILE_DIR:torch-js>)
if(WIN32)
# use move for windows since the libs are too large to be copied on github actions vm
add_custom_command(TARGET torch-js POST_BUILD
COMMAND powershell mv
"\"${CMAKE_CURRENT_BINARY_DIR}/libtorch/lib/*.dll\""
\"$<TARGET_FILE_DIR:torch-js>\")
else()
add_custom_command(TARGET torch-js POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_CURRENT_BINARY_DIR}/libtorch/lib"
$<TARGET_FILE_DIR:torch-js>)
endif()

if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/torchvision/bin")
add_custom_command(TARGET torch-js POST_BUILD
Expand Down

0 comments on commit 8be97a8

Please sign in to comment.