Skip to content

Commit 1d044dc

Browse files
pjh5facebook-github-bot
authored andcommitted
Changing sed call in CUDA conda-builds to keep friendly package name
Summary: Closes facebookarchive/caffe2#1893 Reviewed By: orionr Differential Revision: D6903915 Pulled By: pjh5 fbshipit-source-id: 4cdd98f7cc0be68f6aa9a455c4d4d8478c4e8869
1 parent 61ad0e4 commit 1d044dc

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

conda/cuda/meta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% set version = "0.8.dev" %}
22

33
package:
4-
name: caffe2-cuda%%CUDA_VERSION%%-cudnn%%CUDNN_VERSION%%
4+
name: caffe2-cuda
55
version: {{ version }}
66

77
source:

scripts/build_anaconda.sh

+1-7
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,10 @@ if [[ "${BUILD_ENVIRONMENT}" == *cuda* ]]; then
3131
# the package name in meta.yaml based off of these values, we let Caffe2
3232
# take the CUDA and cuDNN versions that it finds in the build environment,
3333
# and manually set the package name ourself.
34-
# NOTE: These are magic strings that exist in the meta.yaml
3534
# WARNING: This does not work on mac.
36-
sed -i "s/%%CUDA_VERSION%%/${CAFFE2_CUDA_VERSION}/" "${CAFFE2_ROOT}/conda/cuda/meta.yaml"
37-
sed -i "s/%%CUDNN_VERSION%%/${CAFFE2_CUDNN_VERSION}/" "${CAFFE2_ROOT}/conda/cuda/meta.yaml"
35+
sed -i "s/caffe2-cuda/caffe2-cuda${CAFFE2_CUDA_VERSION}-cudnn${CAFFE2_CUDNN_VERSION}/" "${CAFFE2_ROOT}/conda/cuda/meta.yaml"
3836

3937
conda build "${CAFFE2_ROOT}/conda/cuda" ${CONDA_BLD_ARGS[@]} "$@"
40-
41-
# Change the names back
42-
sed -i "s/${CAFFE2_CUDA_VERSION}/%%CUDA_VERSION%%/" "${CAFFE2_ROOT}/conda/cuda/meta.yaml"
43-
sed -i "s/${CAFFE2_CUDNN_VERSION}/%%CUDNN_VERSION%%/" "${CAFFE2_ROOT}/conda/cuda/meta.yaml"
4438
else
4539
conda build "${CAFFE2_ROOT}/conda/no_cuda" ${CONDA_BLD_ARGS[@]} "$@"
4640
fi

0 commit comments

Comments
 (0)