2023-01-05 21:03:53 +00:00
|
|
|
FROM docker.io/python:3.10-buster
|
|
|
|
|
|
|
|
WORKDIR /onnx-web
|
|
|
|
|
2023-01-12 01:47:15 +00:00
|
|
|
RUN pip3 install virtualenv --upgrade
|
2023-01-06 20:17:06 +00:00
|
|
|
|
2023-01-12 01:47:15 +00:00
|
|
|
RUN python3 -m venv onnx_env
|
|
|
|
|
|
|
|
ENV PATH="/onnx-web/onnx_web/bin:$PATH"
|
|
|
|
|
|
|
|
RUN pip3 install pip --upgrade
|
2023-01-06 20:17:06 +00:00
|
|
|
|
2023-01-13 06:14:14 +00:00
|
|
|
RUN pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu --no-cache-dir --ignore-installed
|
2023-01-05 21:03:53 +00:00
|
|
|
|
2023-01-13 06:14:14 +00:00
|
|
|
COPY requirements.txt /onnx-web/requirements.txt
|
2023-01-12 01:47:15 +00:00
|
|
|
|
2023-01-13 06:14:14 +00:00
|
|
|
RUN pip3 install -r requirements.txt --no-cache-dir
|
2023-01-05 21:03:53 +00:00
|
|
|
|
2023-01-06 22:11:41 +00:00
|
|
|
COPY onnx_web/ /onnx-web/onnx_web/
|
2023-01-05 21:03:53 +00:00
|
|
|
|
2023-01-06 22:18:53 +00:00
|
|
|
ENTRYPOINT [ "flask", "--app=onnx_web.serve", "run", "--host=0.0.0.0" ]
|