Skip to content

Commit

Permalink
fix(build): add venv to CPU image
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 12, 2023
1 parent 07c18c2 commit 362b732
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions api/Containerfile.cpu.buster
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ FROM docker.io/python:3.10-buster

WORKDIR /onnx-web

# TODO: set up venv within the container
RUN pip3 install virtualenv --upgrade

RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
RUN python3 -m venv onnx_env

ENV PATH="/onnx-web/onnx_web/bin:$PATH"

RUN pip3 install pip --upgrade

COPY requirements.txt /onnx-web/requirements.txt

RUN pip install -r requirements.txt
RUN pip3 install -r requirements.txt

RUN pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu

COPY onnx_web/ /onnx-web/onnx_web/

Expand Down
2 changes: 2 additions & 0 deletions api/Containerfile.cuda.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ RUN python3 -m venv onnx_env

ENV PATH="/onnx-web/onnx_web/bin:$PATH"

RUN pip3 install pip --upgrade

COPY requirements.txt /onnx-web/requirements.txt

RUN pip3 install -r requirements.txt
Expand Down

0 comments on commit 362b732

Please sign in to comment.