Skip to content

Commit

Permalink
fix(build): install CPU deps during CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Apr 15, 2023
1 parent f5c606e commit 1853214
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ stages:
key:
files:
- api/requirements/base.txt
- api/requirements/cpu.txt
- api/requirements/dev.txt
paths:
- .cache/pip
policy: pull-push
Expand Down
1 change: 1 addition & 0 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ check-venv:
if [ -z $${VIRTUAL_ENV+x} ]; then echo "Are you sure you want to install dependencies outside of a virtual environment?"; sleep 30; fi

pip: check-venv
pip install -r requirements/cpu.txt
pip install -r requirements/base.txt

pip-dev: check-venv
Expand Down
5 changes: 5 additions & 0 deletions api/onnx_web/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import atexit
import gc
import mimetypes
from functools import partial
from logging import getLogger

Expand Down Expand Up @@ -32,6 +33,10 @@ def main():
setproctitle("onnx-web server")
set_start_method("spawn", force=True)

# set up missing mimetypes
mimetypes.add_type("application/javascript", ".js")
mimetypes.add_type("text/css", ".css")

context = ServerContext.from_environ()
apply_patches(context)
check_paths(context)
Expand Down

0 comments on commit 1853214

Please sign in to comment.