Skip to content

Commit

Permalink
templatized conda meta.yaml for version
Browse files Browse the repository at this point in the history
  • Loading branch information
harshbafna committed May 25, 2020
1 parent a445dfb commit 59943ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions binaries/conda/build_packages.sh
Expand Up @@ -4,12 +4,18 @@ set -eou pipefail

PYTHON_VERSIONS="3.6 3.7 3.8"
PKGS="torchserve torch-model-archiver"
TORCHSERVE_VERSION=`cat ../../ts/version.txt`
TORCH_MODEL_ARCHIVER_VERSION=`cat ../../model-archiver/model_archiver/version.txt`

for pkg in ${PKGS}; do
PKG_VERSION=$(echo $pkg | tr 'a-z' 'A-Z' | tr '-' '_')_VERSION
cat $pkg/meta.yaml.tmpl | sed -e "s/{version}/$PKG_VERSION/" >> $pkg/meta.yaml
for python_version in ${PYTHON_VERSIONS}; do
(
set -x
conda build --output-folder output/ --python="${python_version}" "${pkg}"
set +x
)
done
rm $pkg/meta.yaml
done
@@ -1,6 +1,6 @@
package:
name: torch-model-archiver
version: 0.1.0
version: {version}

requirements:
build:
Expand Down
@@ -1,6 +1,6 @@
package:
name: torchserve
version: 0.1.0
version: {version}

requirements:
build:
Expand Down

0 comments on commit 59943ab

Please sign in to comment.