2023-01-12 00:15:22 +00:00
|
|
|
FROM docker.io/nvidia/cuda:11.7.1-runtime-ubuntu20.04
|
|
|
|
|
2023-01-21 23:01:02 +00:00
|
|
|
WORKDIR /onnx-web/api
|
|
|
|
|
2023-01-12 01:48:24 +00:00
|
|
|
RUN apt-get -y update \
|
2023-01-21 23:01:02 +00:00
|
|
|
&& apt-get install -y ffmpeg libsm6 libxext6 \
|
2023-01-12 01:48:24 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2023-01-05 21:03:53 +00:00
|
|
|
|
2023-01-21 23:01:02 +00:00
|
|
|
RUN apt-get -y update \
|
|
|
|
&& apt-get -y install python3 python3-pip python3-venv \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2023-01-05 21:03:53 +00:00
|
|
|
|
2023-01-11 23:21:46 +00:00
|
|
|
RUN python3 -m venv onnx_env
|
2023-01-06 20:17:06 +00:00
|
|
|
|
2023-01-23 01:08:41 +00:00
|
|
|
ENV PATH="/onnx-web/api/onnx_env/bin:$PATH"
|
2023-01-06 20:17:06 +00:00
|
|
|
|
2023-01-12 01:47:15 +00:00
|
|
|
RUN pip3 install pip --upgrade
|
|
|
|
|
2023-03-05 23:55:44 +00:00
|
|
|
COPY requirements/ /onnx-web/api/requirements/
|
2023-01-13 06:38:36 +00:00
|
|
|
|
2023-03-18 00:41:34 +00:00
|
|
|
RUN pip3 install -r requirements/nvidia.txt --no-cache-dir
|
|
|
|
|
|
|
|
RUN pip3 install -r requirements/base.txt --no-cache-dir
|
2023-01-11 23:21:46 +00:00
|
|
|
|
2023-01-14 03:56:03 +00:00
|
|
|
COPY onnx_web/ /onnx-web/api/onnx_web/
|
2023-01-05 21:03:53 +00:00
|
|
|
|
2023-02-03 04:50:19 +00:00
|
|
|
COPY extras.json logging.yaml params.json /onnx-web/api/
|
2023-01-22 04:34:41 +00:00
|
|
|
|
2023-04-25 00:23:52 +00:00
|
|
|
COPY schemas/ /onnx-web/api/schemas/
|
|
|
|
|
2023-02-03 04:50:19 +00:00
|
|
|
COPY launch.sh /onnx-web/launch.sh
|
2023-01-21 23:55:30 +00:00
|
|
|
|
2023-01-14 03:56:03 +00:00
|
|
|
ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui"
|
|
|
|
|
|
|
|
COPY gui/ /onnx-web/gui/
|
|
|
|
|
2023-01-31 14:45:06 +00:00
|
|
|
ENV ONNX_WEB_DEFAULT_PLATFORM="cuda"
|
|
|
|
|
2023-01-22 04:34:41 +00:00
|
|
|
CMD [ "sh", "-c", "/onnx-web/launch.sh" ]
|