Skip to content

Commit

Permalink
Change base image to cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
Lajcisvk committed Mar 21, 2024
1 parent 816302b commit 6ef4ccb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
FROM nvcr.io/nvidia/tensorrt:24.02-py3
FROM nvidia/cuda:12.3.2-devel-ubuntu22.04

WORKDIR /rembg

COPY . .

# RUN apt-get update
# RUN apt install software-properties-common -y
# RUN add-apt-repository ppa:deadsnakes/ppa -y
RUN apt-get update
RUN apt-get install -y python-is-python3 python3 python3-pip
# RUN pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
RUN python -m pip install ".[gpu,cli]"
RUN python -c 'from rembg.bg import download_models; download_models()'

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"twine",
"wheel",
],
"gpu": [""],
"gpu": ["onnxruntime-gpu"],
"cli": [
"aiohttp",
"asyncer",
Expand Down Expand Up @@ -85,7 +85,7 @@
python_requires=">=3.8, <3.13",
packages=find_packages(),
install_requires=install_requires,
# dependency_links=['https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/'],
dependency_links=['https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/'],
entry_points=entry_points,
extras_require=extras_require,
version=versioneer.get_version(),
Expand Down

0 comments on commit 6ef4ccb

Please sign in to comment.