-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): add DirectML and ROCm images
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM docker.io/python:3.10-buster | ||
|
||
WORKDIR /onnx-web/api | ||
|
||
RUN pip3 install virtualenv --upgrade | ||
|
||
RUN python3 -m venv onnx_env | ||
|
||
ENV PATH="/onnx-web/api/onnx_web/bin:$PATH" | ||
|
||
RUN pip3 install pip --upgrade | ||
|
||
RUN pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu --no-cache-dir --ignore-installed | ||
|
||
RUN pip3 install onnxruntime-directml --force-reinstall | ||
|
||
RUN pip3 install --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly-directml --force-reinstall | ||
|
||
COPY requirements.txt /onnx-web/api/requirements.txt | ||
|
||
RUN pip3 install -r requirements.txt --no-cache-dir | ||
|
||
COPY onnx_web/ /onnx-web/api/onnx_web/ | ||
|
||
ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui" | ||
|
||
COPY gui/ /onnx-web/gui/ | ||
|
||
CMD [ "flask", "--app=onnx_web.serve", "run", "--host=0.0.0.0" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM docker.io/rocm/pytorch:rocm5.4_ubuntu20.04_py3.8_pytorch_1.12.1 | ||
|
||
WORKDIR /onnx-web/api | ||
|
||
RUN pip3 install virtualenv --upgrade | ||
|
||
RUN python3 -m venv onnx_env | ||
|
||
ENV PATH="/onnx-web/api/onnx_web/bin:$PATH" | ||
|
||
RUN pip3 install pip --upgrade | ||
|
||
COPY requirements.txt /onnx-web/api/requirements.txt | ||
|
||
RUN pip3 install -r requirements.txt --no-cache-dir | ||
|
||
COPY onnx_web/ /onnx-web/api/onnx_web/ | ||
|
||
ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui" | ||
|
||
COPY gui/ /onnx-web/gui/ | ||
|
||
CMD [ "flask", "--app=onnx_web.serve", "run", "--host=0.0.0.0" ] |