Skip to content

Commit

Permalink
Merge pull request #112 from aws/master_pyarrow_fix
Browse files Browse the repository at this point in the history
Master pyarrow and integration tests fix
  • Loading branch information
NikhilRaverkar authored May 10, 2022
2 parents 5780bd9 + 6db044e commit f8015ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/0.23-1/base/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG MINICONDA_VERSION=4.8.3
ARG CONDA_PY_VERSION=37
ARG CONDA_PKG_VERSION=4.9.0
ARG PYTHON_VERSION=3.7.10
ARG PYARROW_VERSION=0.16.0
ARG PYARROW_VERSION=3.0.0
ARG MLIO_VERSION=0.6.0

# Install python and other scikit-learn runtime dependencies
Expand Down
11 changes: 8 additions & 3 deletions test/integration/test_multiple_model_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,24 @@ def modulevolume():

@pytest.fixture(scope='module', autouse=True)
def container(request, docker_base_name, tag):
module_dir = os.path.join(resource_path, 'module')
model_dir = os.path.join(resource_path, 'models')

test_name = 'sagemaker-sklearn-serving-test'
try:
command = (
'docker run --name {} -p 8080:8080'
' --mount type=volume,source=dynamic_endpoint_model_volume,target=/opt/ml/model,readonly'
' --mount type=volume,source=dynamic_endpoint_module_volume,target=/user_module,readonly'
# ' --mount type=volume,source=dynamic_endpoint_model_volume,target=/opt/ml/model,readonly'
# ' --mount type=volume,source=dynamic_endpoint_module_volume,target=/user_module,readonly'
' -v {}:/opt/ml/model'
' -v {}:/user_module'
' -e SAGEMAKER_BIND_TO_PORT=8080'
' -e SAGEMAKER_SAFE_PORT_RANGE=9000-9999'
' -e SAGEMAKER_MULTI_MODEL=true'
' -e SAGEMAKER_PROGRAM={}'
' -e SAGEMAKER_SUBMIT_DIRECTORY={}'
' {}:{} serve'
).format(test_name, 'script.py', "/user_module/user_code.tar.gz", docker_base_name, tag)
).format(test_name, model_dir, module_dir, 'script.py', "/user_module/user_code.tar.gz", docker_base_name, tag)

proc = subprocess.Popen(command.split(), stdout=sys.stdout, stderr=subprocess.STDOUT)

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
conda_deps=
pyarrow=0.16.0
pyarrow=3.0.0
mlio-py=0.5
conda_channels=
conda-forge
Expand Down

0 comments on commit f8015ce

Please sign in to comment.