-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Could I have installed liblzma in docker and saved a few hours? Yes. Yes I could have. But where's the fun in that? :D
- Loading branch information
1 parent
a966f58
commit d86c478
Showing
10 changed files
with
114 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
services: | ||
transformer: | ||
build: | ||
context: . | ||
dockerfile: transformer/Dockerfile | ||
environment: | ||
- SEDD_OUTPUT_TYPE=${SEDD_OUTPUT_TYPE:-json} | ||
- SPDLOG_LEVEL=${SPDLOG_LEVEL} | ||
user: "1000" | ||
volumes: | ||
# Change these paths to use different source directories | ||
# for the container | ||
- ./downloads/:/app/downloads | ||
- ./out/:/app/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM ubuntu:latest | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get upgrade -y \ | ||
&& apt-get install -y libssl-dev cmake gcc g++ git | ||
|
||
ARG SEDD_OUTPUT_TYPE=json | ||
ENV SPDLOG_LEVEL=info | ||
|
||
COPY transformer/src /app/src | ||
COPY transformer/tests /app/tests | ||
COPY transformer/CMakeLists.txt /app/CMakeLists.txt | ||
COPY transformer/cmake /app/cmake | ||
COPY transformer/dep_provider.cmake /app/dep_provider.cmake | ||
|
||
RUN mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make -j $(nproc) | ||
|
||
|
||
CMD ls -la ./downloads && ls -la ./out \ | ||
&& /app/build/bin/sedd-transformer -i /app/downloads -o /app/out -t ${SEDD_OUTPUT_TYPE} || sleep 460000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
set (BUILD_TESTING OFF CACHE STRING "" FORCE) | ||
set (BUILD_SHARED_LIBS ON) | ||
|
||
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
xz | ||
GIT_REPOSITORY https://github.com/tukaani-project/xz | ||
GIT_TAG v5.6.2 | ||
) | ||
FetchContent_MakeAvailable(xz) | ||
set(LIBLZMA_INCLUDE_DIRS ${xz_SOURCE_DIR}/src/liblzma/api/) | ||
set (LIBLZMA_LIBRARY liblzma) | ||
|
||
set (LIBLZMA_FOUND ON) | ||
set (LIBLZMA_LIBRARIES liblzma) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
|
||
set (ROOT_DIR ${CMAKE_SOURCE_DIR}) | ||
set (DEP_OVERRIDES ${ROOT_DIR}/cmake/) | ||
|
||
macro(sedd_provide_dependency method package_name) | ||
|
||
if (NOT ("${DEP_OVERRIDES}" IN_LIST CMAKE_MODULE_PATH)) | ||
list(APPEND CMAKE_MODULE_PATH "${DEP_OVERRIDES}") | ||
endif() | ||
|
||
message(STATUS "INSTALLING DEP: ${package_name} with lookup path ${CMAKE_MODULE_PATH}") | ||
find_package(${package_name} BYPASS_PROVIDER) | ||
endmacro() | ||
|
||
cmake_language( | ||
SET_DEPENDENCY_PROVIDER sedd_provide_dependency | ||
SUPPORTED_METHODS FIND_PACKAGE | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters