Skip to content

Commit e91ecd7

Browse files
author
Dominik Falkner
committed
Merge branch 'dfalkner/add-docker-compose-default' into 'main'
Update 2 files See merge request common/python-package-template!9
2 parents c66a3c8 + 0767f21 commit e91ecd7

2 files changed

Lines changed: 50 additions & 32 deletions

File tree

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
33
{
4-
"name": "CUDA Container ",
5-
"build": {
6-
// Sets the run context to one level up instead of the .devcontainer folder.
7-
"context": "..",
8-
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
9-
"dockerfile": "../Dockerfile",
10-
"args": {
11-
"IMAGE_NAME": "nvidia/cuda:12.3.1-runtime-ubuntu22.04"
12-
},
13-
"target": "dev"
14-
},
15-
"features": {
16-
"ghcr.io/devcontainers/features/git-lfs:1": {
17-
"autoPull": true,
18-
"version": "latest"
19-
}
20-
},
21-
"runArgs": [
22-
"--gpus=all"
23-
]
4+
"name": "DEV Container",
5+
"dockerComposeFile": "./docker-compose.yml",
6+
"service": "devcontainer",
7+
"workspaceFolder": "/workspace",
8+
"features": {
9+
// https://containers.dev/features
10+
"ghcr.io/devcontainers/features/git-lfs:1": {
11+
"autoPull": true,
12+
"version": "latest"
13+
}
14+
},
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
// add extensions for vscode here, you can copy the id from the extension page
19+
// "ms-toolsai.jupyter",
20+
// "ms-toolsai.vscode-jupyter-powertoys",
21+
"ms-azuretools.vscode-docker",
22+
"ms-python.python",
23+
"ms-python.debugpy",
24+
"ms-vscode-remote.remote-containers"
25+
]
26+
}
27+
}
2428

25-
// Features to add to the dev container. More info: https://containers.dev/features.
26-
// "features": {},
29+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
30+
// "forwardPorts": [],
2731

28-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
29-
// "forwardPorts": [],
32+
// Uncomment the next line to run commands after the container is created.
33+
// "postCreateCommand": "cat /etc/os-release",
3034

31-
// Uncomment the next line to run commands after the container is created.
32-
// "postCreateCommand": "cat /etc/os-release",
33-
34-
// Configure tool-specific properties.
35-
// "customizations": {},
36-
37-
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
38-
// "remoteUser": "devcontainer"
35+
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
36+
// "remoteUser": "devcontainer"
3937
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
services:
2+
devcontainer:
3+
# load environment variables from a dotenv file
4+
# env_file: ".env"
5+
build:
6+
context: ../..
7+
dockerfile: Dockerfile
8+
# build to stage 'dev'
9+
target: dev
10+
# set args for build process
11+
# args:
12+
# FROM_IMAGE: debian:stable-slim
13+
volumes:
14+
# Mounts the project folder to '/workspace'. While this file is in .devcontainer,
15+
# mounts are relative to the first file in the list, which is a level up.
16+
- ../../:/workspace:cached
17+
# Uncomment to run the container with GPU support
18+
# runtime: nvidia
19+
environment:
20+
- NVIDIA_VISIBLE_DEVICES=all

0 commit comments

Comments
 (0)