Skip to content

Commit

Permalink
fix: pin starlette in mlserver-huggingface (#81)
Browse files Browse the repository at this point in the history
- pin starlette due to #80
- remove redundant `cp` part.
- remove `source` part from command according to #37
- tox.ini: unpin chisme
  • Loading branch information
orfeas-k authored Jan 11, 2024
1 parent 1061ede commit c8c02d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 3 additions & 5 deletions mlserver-huggingface/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
startup: enabled
# Do not split command in many lines using `\` because this results in
# export: command not found error during container startup
command: bash -c 'export PATH=/opt/conda/bin/:/opt/mlserver/.local/bin:${PATH}:/usr/bin && export PYTHONPATH=/opt/mlserver/.local/lib/python3.8/site-packages/:${PYTHONPATH} && eval $(/opt/conda/bin/conda shell.bash hook 2> /dev/null) && source /hack/activate-env.sh ${MLSERVER_ENV_TARBALL} && mlserver start ${MLSERVER_MODELS_DIR}'
command: bash -c 'export PATH=/opt/conda/bin/:/opt/mlserver/.local/bin:${PATH}:/usr/bin && export PYTHONPATH=/opt/mlserver/.local/lib/python3.8/site-packages/:${PYTHONPATH} && eval $(/opt/conda/bin/conda shell.bash hook 2> /dev/null) && mlserver start ${MLSERVER_MODELS_DIR}'
working-dir: "/opt/mlserver"
environment:
MLSERVER_ENV_TARBALL: "/mnt/models/environment.tar.gz"
Expand All @@ -40,10 +40,6 @@ parts:
mkdir -p ${CRAFT_PART_INSTALL}/opt/mlserver/dist
mkdir -p ${CRAFT_PART_INSTALL}/opt/openapi
cp ${CRAFT_PART_SRC}/setup.py .
cp ${CRAFT_PART_SRC}/MANIFEST.in .
cp ${CRAFT_PART_SRC}/README.md .
./hack/build-wheels.sh ${CRAFT_PART_INSTALL}/opt/mlserver/dist
override-stage: |
Expand Down Expand Up @@ -80,6 +76,8 @@ parts:
pip install --prefix ${MLSERVER_PATH}/.local --upgrade pip wheel setuptools
pip install --prefix ${MLSERVER_PATH}/.local $(ls "./wheels/mlserver-"*.whl)
pip install --prefix ${MLSERVER_PATH}/.local $(ls "./wheels/mlserver_${ROCK_RUNTIME}-"*.whl)
# Pin starlette due to https://github.com/canonical/seldonio-rocks/issues/80
echo starlette==0.22.0 >> ${CRAFT_PART_SRC}/requirements/docker.txt
pip install --prefix ${MLSERVER_PATH}/.local -r ${CRAFT_PART_SRC}/requirements/docker.txt
chown -R root:root ${MLSERVER_PATH} && chmod -R 777 ${MLSERVER_PATH}
Expand Down
5 changes: 1 addition & 4 deletions mlserver-huggingface/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ commands =
passenv = *
deps =
pytest
git+https://github.com/canonical/charmed-kubeflow-chisme.git@main
# Remove above line and uncomment below once we publish
# https://github.com/canonical/charmed-kubeflow-chisme/pull/81
# charmed_kubeflow_chisme
charmed_kubeflow_chisme
commands =
# run rock tests
pytest -v --tb native --show-capture=all --log-cli-level=INFO {posargs} {toxinidir}/tests
Expand Down

0 comments on commit c8c02d1

Please sign in to comment.