-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ogamache/devcontainer
Created docker devcontainer
- Loading branch information
Showing
3 changed files
with
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: '2.23' | ||
services: | ||
service_container_lab: | ||
build: | ||
context: ../ | ||
dockerfile: ./Dockerfile | ||
container_name: laboratoires_container | ||
stdin_open: true | ||
tty: true | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
capabilities: [gpu] | ||
volumes: | ||
- ../:/workspace:cached | ||
|
||
|
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 @@ | ||
{ | ||
"name": "deep-learning-class-dev", | ||
"dockerComposeFile": [ | ||
"compose.yaml" // the docker compose file that we want to run | ||
], | ||
"workspaceFolder": "/workspace/", | ||
// "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/project,type=bind", | ||
"service": "service_container_lab", // The service in docker-compose.yml that we want vs code to use as a dev containers | ||
"shutdownAction": "stopCompose", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-toolsai.jupyter", | ||
"ms-toolsai.vscode-jupyter-cell-tags", | ||
"ms-toolsai.jupyter-renderers", | ||
"ms-toolsai.vscode-jupyter-slideshow", | ||
"ms-python.vscode-pylance", | ||
"ms-python.python", | ||
"ms-toolsai.jupyter-keymap" | ||
] | ||
} | ||
} | ||
} |
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,32 @@ | ||
FROM nvidia/cuda:11.4.3-base-ubuntu20.04 | ||
|
||
# Set environment variables | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install system dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
git \ | ||
python3-pip \ | ||
python3-dev \ | ||
python3-opencv \ | ||
libglib2.0-0 | ||
|
||
# WORKDIR /workspace/ | ||
|
||
# Install any python packages you need | ||
COPY ./requirements.txt requirements.txt | ||
COPY ./setup.py setup.py | ||
COPY ./deeplib/ deeplib/ | ||
|
||
# Upgrade pip | ||
RUN python3 -m pip install --upgrade pip | ||
|
||
# Install PyTorch and torchvision | ||
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 | ||
RUN python3 -m pip install -r requirements.txt | ||
RUN pip install . | ||
|
||
|
||
# Set the working directory | ||
WORKDIR /workspace/ |