build: 🔨 Devcontainer updated.

Updated devcontainer with texlive options. Improve build. Aux files cleaned after build.
This commit is contained in:
Слободан Јелић 2025-10-10 10:30:38 +00:00
parent 9a43e4675c
commit c670e7fa16
6 changed files with 223 additions and 114 deletions

View File

@ -1,19 +1,24 @@
{
"name": "STEINGEN",
"containerUser": "root",
"workspaceFolder": "/steingen",
"dockerComposeFile": "../compose.yaml",
"service": "steingen",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.makefile-tools",
"george-alisson.html-preview-vscode",
"ms-vscode.cpptools-extension-pack"
]
}
},
"shutdownAction": "stopCompose"
}
{
"name": "STEINGEN",
"containerUser": "root",
"workspaceFolder": "/steingen",
"dockerComposeFile": "../compose.yaml",
"service": "steingen",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.makefile-tools",
"george-alisson.html-preview-vscode",
"ms-vscode.cpptools-extension-pack",
"github.copilot",
"james-yu.latex-workshop",
"GitHub.copilot",
"nickfode.latex-formatter",
"vivaxy.vscode-conventional-commits",
"mhutchie.git-graph"
]
}
},
"shutdownAction": "stopCompose"
}

50
.vscode/launch.json vendored
View File

@ -1,26 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Steiner Tree generator",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/main",
// "args": ["${workspaceFolder}/examples/158_RANDOM_n=800_m=159800_k=28_B=10.stp"],
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Steiner Tree generator",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/main",
// "args": ["${workspaceFolder}/examples/158_RANDOM_n=800_m=159800_k=28_B=10.stp"],
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}

126
.vscode/settings.json vendored
View File

@ -1,14 +1,114 @@
{
"files.associations": {
"random_graph.h": "c",
"random_groups.h": "c",
"random_edge_weight.h": "c",
"rand_large.h": "c",
"stdint.h": "c",
"random_group_steiner.h": "c",
"random_vertex_weight.h": "c",
"getopt.h": "c",
"string.h": "c",
"stdlib.h": "c"
}
{
"files.associations": {
"random_graph.h": "c",
"random_groups.h": "c",
"random_edge_weight.h": "c",
"rand_large.h": "c",
"stdint.h": "c",
"random_group_steiner.h": "c",
"random_vertex_weight.h": "c",
"getopt.h": "c",
"string.h": "c",
"stdlib.h": "c"
},
"latex-workshop.docker.enabled": true,
"latex-workshop.latex.autoBuild.run": "onSave",
"latex-workshop.docker.image.latex": "texlive/texlive",
"latex-workshop.latex.clean.subfolder.enabled": true,
"latex-workshop.latex.clean.fileTypes": [
"*.aux",
"*.bbl",
"*.blg",
"*.idx",
"*.ind",
"*.lof",
"*.log",
"*.lot",
"*.out",
"*.toc",
"*.acn",
"*.acr",
"*.alg",
"*.glg",
"*.glo",
"*.gls",
"*.fls",
"*.fdb_latexmk",
"*.synctex.gz",
"*.run.xml",
"*.bcf"
],
"latex-workshop.latex.outDir": ".",
"latex-workshop.latex.autoClean.run": "onBuilt",
"latex-workshop.latex.recipes": [
{
"name": "latexmk (Docker)",
"tools": ["latexmk"]
}
],
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "docker",
"args": [
"run",
"--rm",
"--name",
"texlive",
"-v",
"D:/STEINGEN/docs:/workspace",
"-v",
"C:/Users/sjelic/texmf/bibtex/bib/Articles.bib:/workspace/Articles.bib",
"-w",
"/workspace",
"texlive/texlive",
"latexmk",
"-pdf",
"-synctex=1",
"%DOC%"
]
},
{
"name": "pdflatex",
"command": "docker",
"args": [
"run",
"--rm",
"--name",
"texlive",
"-v",
"D:/STEINGEN/docs:/workspace",
"-v",
"C:/Users/sjelic/texmf/bibtex/Articles.bib:/workspace/Articles.bib",
"-w",
"/workspace",
"texlive/texlive",
"pdflatex",
"-synctex=1",
"-interaction=nonstopmode",
"%DOC%"
]
},
{
"name": "biber",
"command": "docker",
"args": [
"run",
"--rm",
"--name",
"texlive",
"-v",
"D:/STEINGEN/docs:/workspace",
"-w",
"/workspace",
"texlive/texlive",
"biber",
"--input-directory",
"/workspace",
"--output-directory",
"/workspace",
"%DOC%"
]
}
]
}

50
.vscode/tasks.json vendored
View File

@ -1,26 +1,26 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Program",
"type": "shell",
"command": "make",
"args": [],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$gcc"],
"detail": "Build the project using Makefile"
},
{
"label": "Clean Build",
"type": "shell",
"command": "make",
"args": ["clean"],
"group": "build",
"problemMatcher": []
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Program",
"type": "shell",
"command": "make",
"args": [],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$gcc"],
"detail": "Build the project using Makefile"
},
{
"label": "Clean Build",
"type": "shell",
"command": "make",
"args": ["clean"],
"group": "build",
"problemMatcher": []
}
]
}

View File

@ -1,18 +1,21 @@
version: '3'
name: steingen
services:
steingen:
build:
context: .
dockerfile: gcc.dockerfile
container_name: steingen
volumes:
- steingen-volume:/steingen
- .:/steingen
- /var/run/docker.sock:/var/run/docker.sock
# environment:
# - NODE_ENV=development
user: root
command: sleep infinity
volumes:
steingen-volume:
version: '3'
name: steingen
services:
steingen:
build:
context: .
dockerfile: gcc.dockerfile
container_name: steingen
volumes:
- steingen-volume:/steingen
- .:/steingen
- /var/run/docker.sock:/var/run/docker.sock
- C:/Users/sjelic/texmf/bibtex/bib/Articles.bib:/steingen/docs/Articles.bib
# environment:
# - NODE_ENV=development
user: root
command: sleep infinity
volumes:
steingen-volume:
networks:
host:

View File

@ -1,14 +1,15 @@
# Use a base image with Debian
FROM debian:latest
# Install gcc, gdb, make, and other necessary tools
RUN apt-get update && apt-get install -y \
gcc \
gdb \
make \
doxygen \
valgrind \
&& apt-get clean
RUN ulimit -s unlimited
# Set working directory within the container
WORKDIR /steingen
# Use a base image with Debian
FROM debian:latest
# Install gcc, gdb, make, and other necessary tools
RUN apt-get update && apt-get install -y \
gcc \
gdb \
make \
doxygen \
valgrind \
docker.io
RUN apt-get clean
RUN ulimit -s unlimited
# Set working directory within the container
WORKDIR /steingen