Skip to content

Commit 690d855

Browse files
committed
Add devcontainer environment for the repo
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
1 parent 3259912 commit 690d855

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM ubuntu:22.04
2+
3+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
4+
&& apt-get -y install --no-install-recommends \
5+
net-tools less python3 python3-pip \
6+
software-properties-common vim build-essential \
7+
git curl wget unzip python3-dev \
8+
gtkwave iverilog myhdl-cosimulation python3-myhdl
9+
10+
RUN pip3 install cocotb \
11+
cocotb-bus cocotb-test cocotbext-axi \
12+
cocotbext-eth cocotbext-pcie \
13+
pytest scapy \
14+
tox pytest-xdist pytest-sugar
15+
16+
RUN git clone https://github.com/myhdl/myhdl && \
17+
cd myhdl/cosimulation/icarus && \
18+
make && cp myhdl.vpi /usr/lib/aarch64-linux-gnu/ivl/

.devcontainer/devcontainer.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/python-3
3+
{
4+
"name": "verilog-ethernet-devenv",
5+
6+
"build": {
7+
"dockerfile": "Dockerfile",
8+
"context": "..",
9+
"args": {
10+
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
11+
// Append -bullseye or -buster to pin to an OS version.
12+
// Use -bullseye variants on local on arm64/Apple Silicon.
13+
"VARIANT": "3.10-bullseye",
14+
// Options
15+
"NODE_VERSION": "lts/*"
16+
}
17+
},
18+
19+
// Configure tool-specific properties.
20+
"customizations": {
21+
// Configure properties specific to VS Code.
22+
"vscode": {
23+
// Set *default* container specific settings.json values on container create.
24+
"settings": {
25+
"python.defaultInterpreterPath": "/usr/local/bin/python",
26+
"python.linting.enabled": true,
27+
"python.linting.pylintEnabled": true,
28+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
29+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
30+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
31+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
32+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
33+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
34+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
35+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
36+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
37+
},
38+
39+
// Add the IDs of extensions you want installed when the container is created.
40+
"extensions": [
41+
"ms-python.python",
42+
"ms-toolsai.jupyter-renderers",
43+
"ms-toolsai.jupyter",
44+
"ms-python.vscode-pylance",
45+
"ms-vscode.cmake-tools",
46+
"leafvmaple.verilog",
47+
"mshr-h.VerilogHDL",
48+
"GitHub.copilot"
49+
// "BenjaminBenais.copilot-theme"
50+
]
51+
}
52+
},
53+
54+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
55+
// "forwardPorts": [],
56+
57+
// // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
58+
// "remoteUser": "vscode"
59+
60+
"runArgs": [
61+
"--privileged",
62+
"-e", "DISPLAY=host.docker.internal:0",
63+
"-v", "/tmp/.X11-unix:/tmp/.X11-unix"
64+
]
65+
}

0 commit comments

Comments
 (0)