Updated vulkan application to be containerised

This commit is contained in:
Alejandro Saucedo 2020-08-05 07:42:16 +01:00
parent 56d153ab23
commit eca506a521
3 changed files with 29 additions and 2 deletions

12
Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM nvidia/vulkan:1.1.121
RUN apt update -y
RUN apt install g++ -y
RUN mkdir /workspace
WORKDIR /workspace
COPY . /workspace
RUN make build_linux

View file

@ -23,9 +23,24 @@ build: build_shaders
-lvulkan-1 \
-o ./bin/main.exe
build_linux:
g++ \
-Wall \
src/* \
-std=c++11 \
-I"./src" \
-lvulkan \
-o ./bin/main
build_shaders:
$(SCMP) -V shaders/glsl/computeheadless.comp -o shaders/glsl/computeheadless.comp.spv
build_docker:
docker build . -t axsauze/vulkan-sum:0.1
push_docker:
docker push axsauze/vulkan-sum:0.1
format:
$(CF) -i -style="{BasedOnStyle: mozilla, IndentWidth: 4}" src/*.cpp src/*.h src/*.hpp
@ -33,5 +48,5 @@ clean:
rm ./bin/main.exe;
run:
cd bin && ./main.exe;
./bin/main.exe;

View file

@ -15,7 +15,7 @@ getAssetPath()
#if defined(VK_EXAMPLE_DATA_DIR)
return VK_EXAMPLE_DATA_DIR;
#else
return "./../";
return "./";
#endif
}