diff --git a/Makefile b/Makefile index 818422b4ff..70e88127ad 100644 --- a/Makefile +++ b/Makefile @@ -59,8 +59,8 @@ docker-peerconnection_serverless: cp modules/third_party/onnxinfer/lib/*.so.* $(target_lib_dir) mkdir -p $(target_bin_dir) - cp $(output_dir)/peerconnection_serverless $(target_bin_dir) - cp examples/peerconnection/serverless/peerconnection_serverless_pyinfer $(target_bin_dir) + cp $(output_dir)/peerconnection_serverless $(target_bin_dir)/peerconnection_serverless.origin + cp examples/peerconnection/serverless/peerconnection_serverless $(target_bin_dir) mkdir -p $(target_pylib_dir) cp modules/third_party/cmdinfer/*.py $(target_pylib_dir)/ diff --git a/README.md b/README.md index 70cb54c8aa..e9dc59c6b2 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ This section describes required fields for the json configuration file. ##### PyInfer -The default bandwidth estimator is PyInfer, You should implement your Python class named `Estimator` with required methods `report_states` and `get_estimated_bandwidth` in Python file `BandwidthEstimator.py ` and put this file in your workspace. And you should use the `peerconnection_serverless_pyinfer` as the start program. +The default bandwidth estimator is PyInfer, You should implement your Python class named `Estimator` with required methods `report_states` and `get_estimated_bandwidth` in Python file `BandwidthEstimator.py ` and put this file in your workspace. There is an example of Estimator with fixed estimated bandwidth 1Mbps. Here is an example [BandwidthEstimator.py](examples/peerconnection/serverless/corpus/BandwidthEstimator.py). ```python @@ -231,8 +231,8 @@ If you want to use the ONNXInfer as the bandwidth estimator, you should specify PyInfer: ```shell - sudo docker run -d --rm -v `pwd`/examples/peerconnection/serverless/corpus:/app -w /app --name alphartc alphartc peerconnection_serverless_pyinfer receiver_pyinfer.json - sudo docker exec alphartc peerconnection_serverless_pyinfer sender_pyinfer.json + sudo docker run -d --rm -v `pwd`/examples/peerconnection/serverless/corpus:/app -w /app --name alphartc alphartc peerconnection_serverless receiver_pyinfer.json + sudo docker exec alphartc peerconnection_serverless sender_pyinfer.json ``` ONNXInfer: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b28ec30c63..81c4f9f00b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,6 +34,11 @@ steps: && docker exec alphartc peerconnection_serverless sender.json displayName: 'run example' -- script: docker run -d --rm -v `pwd`/examples/peerconnection/serverless/corpus:/app -w /app --name alphartc_pyinfer alphartc peerconnection_serverless_pyinfer receiver_pyinfer.json - && docker exec alphartc_pyinfer peerconnection_serverless_pyinfer sender_pyinfer.json - displayName: 'run cmdinfer example' +- script: docker run -d --rm -v `pwd`/examples/peerconnection/serverless/corpus:/app -w /app --name alphartc_pyinfer alphartc peerconnection_serverless receiver_pyinfer.json + && docker exec alphartc_pyinfer peerconnection_serverless sender_pyinfer.json + displayName: 'run pyinfer example' + +- publish: $(System.DefaultWorkingDirectory)/target + continueOnError: true + artifact: target + displayName: "Archive AlphaRTC Peerconnection" diff --git a/examples/peerconnection/serverless/peerconnection_serverless_pyinfer b/examples/peerconnection/serverless/peerconnection_serverless similarity index 94% rename from examples/peerconnection/serverless/peerconnection_serverless_pyinfer rename to examples/peerconnection/serverless/peerconnection_serverless index 518efc0164..b3121f7d3e 100755 --- a/examples/peerconnection/serverless/peerconnection_serverless_pyinfer +++ b/examples/peerconnection/serverless/peerconnection_serverless @@ -14,7 +14,7 @@ import cmdinfer def main(): app = subprocess.Popen( - ["peerconnection_serverless"] + sys.argv[1:], + ["peerconnection_serverless.origin"] + sys.argv[1:], bufsize=1, stdin=subprocess.PIPE, stdout=subprocess.PIPE,