Skip to content

Commit

Permalink
adding docker support (#895)
Browse files Browse the repository at this point in the history
* adding docker support

* simplifying Dockerfile
  • Loading branch information
FraPochetti authored Jul 23, 2021
1 parent 944b47c commit edcdc28
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:3.8

RUN pip install torch==1.8.0+cu101 torchvision==0.9.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html -U
RUN pip install git+git://github.com/airctic/icevision.git#egg=icevision[all] -U
RUN pip install git+git://github.com/airctic/icedata.git -U
RUN pip install yolov5-icevision -U
RUN pip install mmcv-full==1.3.7 -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.8.0/index.html -U
RUN pip install mmdet==2.13.0 -U
RUN pip install ipywidgets
2 changes: 2 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## How-to
For instructions on how to use the docker-related files in this folder check out [this post](https://francescopochetti.com/developing-inside-a-docker-container-in-visual-studio-code/).
11 changes: 11 additions & 0 deletions docker/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Icevision",
"dockerComposeFile": ["docker-compose.yaml"],
"service": "icevision",
"runServices": ["icevision"],
"workspaceFolder": "/root",
"extensions": [
"ms-python.python",
"ms-azuretools.vscode-docker"
],
}
11 changes: 11 additions & 0 deletions docker/docker-compose.gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3"

services:
icevision:
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
11 changes: 11 additions & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3"

services:
icevision:
build:
dockerfile: Dockerfile
context: .
image: ice
tty: true
volumes:
- ../:/root/

0 comments on commit edcdc28

Please sign in to comment.