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", "name": "STEINGEN",
"containerUser": "root", "containerUser": "root",
"workspaceFolder": "/steingen", "workspaceFolder": "/steingen",
"dockerComposeFile": "../compose.yaml", "dockerComposeFile": "../compose.yaml",
"service": "steingen", "service": "steingen",
"customizations": { "customizations": {
"vscode": { "vscode": {
"extensions": [ "extensions": [
"ms-vscode.cpptools", "ms-vscode.cpptools",
"ms-vscode.makefile-tools", "ms-vscode.makefile-tools",
"george-alisson.html-preview-vscode", "george-alisson.html-preview-vscode",
"ms-vscode.cpptools-extension-pack" "ms-vscode.cpptools-extension-pack",
] "github.copilot",
} "james-yu.latex-workshop",
}, "GitHub.copilot",
"shutdownAction": "stopCompose" "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", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Debug Steiner Tree generator", "name": "Debug Steiner Tree generator",
"type": "cppdbg", "type": "cppdbg",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/build/main", "program": "${workspaceFolder}/build/main",
// "args": ["${workspaceFolder}/examples/158_RANDOM_n=800_m=159800_k=28_B=10.stp"], // "args": ["${workspaceFolder}/examples/158_RANDOM_n=800_m=159800_k=28_B=10.stp"],
"args": [], "args": [],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"environment": [], "environment": [],
"externalConsole": false, "externalConsole": false,
"MIMode": "gdb", "MIMode": "gdb",
"setupCommands": [ "setupCommands": [
{ {
"description": "Enable pretty-printing for gdb", "description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing", "text": "-enable-pretty-printing",
"ignoreFailures": true "ignoreFailures": true
} }
] ]
} }
] ]
} }

126
.vscode/settings.json vendored
View File

@ -1,14 +1,114 @@
{ {
"files.associations": { "files.associations": {
"random_graph.h": "c", "random_graph.h": "c",
"random_groups.h": "c", "random_groups.h": "c",
"random_edge_weight.h": "c", "random_edge_weight.h": "c",
"rand_large.h": "c", "rand_large.h": "c",
"stdint.h": "c", "stdint.h": "c",
"random_group_steiner.h": "c", "random_group_steiner.h": "c",
"random_vertex_weight.h": "c", "random_vertex_weight.h": "c",
"getopt.h": "c", "getopt.h": "c",
"string.h": "c", "string.h": "c",
"stdlib.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", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "Build Program", "label": "Build Program",
"type": "shell", "type": "shell",
"command": "make", "command": "make",
"args": [], "args": [],
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true
}, },
"problemMatcher": ["$gcc"], "problemMatcher": ["$gcc"],
"detail": "Build the project using Makefile" "detail": "Build the project using Makefile"
}, },
{ {
"label": "Clean Build", "label": "Clean Build",
"type": "shell", "type": "shell",
"command": "make", "command": "make",
"args": ["clean"], "args": ["clean"],
"group": "build", "group": "build",
"problemMatcher": [] "problemMatcher": []
} }
] ]
} }

View File

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

View File

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