Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dhanainme authored Apr 23, 2020
2 parents c76265e + 81786dc commit e41ecb6
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 0 deletions.
2 changes: 2 additions & 0 deletions conda/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
output/
*.whl
11 changes: 11 additions & 0 deletions conda/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Building conda packages

To build conda packages you must first produce wheels for the project, see root README.md for information.

After producing wheels use the following command to build conda packages:

```
TORCHSERVE_WHEEL=/path/to/torchserve.whl TORCH_MODEL_ARCHIVER_WHEEL=/path/to/torch_model_archiver_wheel ./build_packages.sh
```

Produced conda packages are then stored in the `output` directory
15 changes: 15 additions & 0 deletions conda/build_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -eou pipefail

PYTHON_VERSIONS="3.6 3.7 3.8"
PKGS="torchserve torch-model-archiver"

for pkg in ${PKGS}; do
for python_version in ${PYTHON_VERSIONS}; do
(
set -x
conda build --output-folder output/ --python="${python_version}" "${pkg}"
)
done
done
5 changes: 5 additions & 0 deletions conda/torch-model-archiver/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -eou pipefail

pip install --no-deps "${TORCH_MODEL_ARCHIVER_WHEEL}"
23 changes: 23 additions & 0 deletions conda/torch-model-archiver/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package:
name: torch-model-archiver
version: 0.0.1b20200409

requirements:
build:
- python
- setuptools

run:
- python
- pillow
- psutil
- future

build:
noarch: generic
script_env:
- TORCH_MODEL_ARCHIVER_WHEEL

about:
home: https://github.com/pytorch/serve
summary: 'Model serving on PyTorch'
5 changes: 5 additions & 0 deletions conda/torchserve/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -eou pipefail

pip install --no-deps "${TORCHSERVE_WHEEL}"
23 changes: 23 additions & 0 deletions conda/torchserve/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package:
name: torchserve
version: 0.0.1b20200409

requirements:
build:
- python
- setuptools

run:
- python
- pillow
- psutil
- future

build:
noarch: generic
script_env:
- TORCHSERVE_WHEEL

about:
home: https://github.com/pytorch/serve
summary: 'Model serving on PyTorch'

0 comments on commit e41ecb6

Please sign in to comment.