-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
118 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# This file is part of the tailRisk distribution (https://github.com/open-risk/tailRisk). | ||
# Copyright (c) 2022 - 2024 Open Risk (https://www.openriskmanagement.com)+ | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, version 3. | ||
# | ||
# This program is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
FROM ubuntu:22.04 | ||
|
||
LABEL description="tailRisk: A library for computing risk measures" | ||
LABEL maintainer="[email protected]" | ||
LABEL version="0.2" | ||
LABEL author="Open Risk <www.openriskmanagement.com>" | ||
|
||
EXPOSE 8080 | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV DJANGO_SETTINGS_MODULE controller.settings | ||
ENV DJANGO_ALLOWED_HOSTS localhost 127.0.0.1 [::1] | ||
|
||
ENV CC=gcc-12 | ||
ENV CXX=gcc-12 | ||
|
||
# Prepare the environment (gcc, cmake, conan and other Python dependencies) | ||
RUN apt update && apt upgrade -y && apt install python3-pip cmake build-essential -y | ||
RUN apt install g++-12 -y | ||
RUN apt install openssl libssl-dev -y | ||
RUN apt install git -y | ||
RUN apt install gpg wget -y | ||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 | ||
ENV CXX=/usr/bin/g++ | ||
ENV CC=/usr/bin/gcc | ||
|
||
# Install and configure Conan | ||
RUN pip3 install conan | ||
RUN conan profile detect --force | ||
ENV CONAN_SYSREQUIRES_SUDO 0 | ||
ENV CONAN_SYSREQUIRES_MODE enabled | ||
|
||
# Copy required files, delete local pre-existing builds | ||
RUN mkdir /tailRisk | ||
COPY ./src/CMakeLists.txt /tailRisk/src/CMakeLists.txt | ||
COPY ./src/conanfile.txt /tailRisk/src/conanfile.txt | ||
COPY ./src/*.cpp /tailRisk/src/ | ||
COPY ./src/*.h /tailRisk/src/ | ||
COPY ./testing/ /tailRisk/testing | ||
|
||
# Remove the build dir (just in case) | ||
RUN rm -rf /tailRisk/src/cmake-build-debug | ||
RUN mkdir /tailRisk/src/cmake-build-debug | ||
|
||
# Install C++ dependencies | ||
WORKDIR /tailRisk/src | ||
RUN conan install . --output-folder=cmake-build-debug --build missing -s build_type=Debug | ||
|
||
# Build tailRisk | ||
WORKDIR /tailRisk/src/cmake-build-debug | ||
RUN cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug | ||
#RUN cmake --build . | ||
|
||
|
||
# If all went well you now have a running instance of tailRisk in a Docker container |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
## Testing | ||
|
||
### Additional Probability Distributions | ||
|
||
* Gamma | ||
* Generalized Inverse Gaussian | ||
* Inverse Gamma | ||
* Negative Binomial | ||
* Pareto | ||
* Stable | ||
|
||
## Functionality | ||
|
||
* Extreme Value Theory | ||
* Mean Excess Plots / Hill Plots | ||
* Python Bindings | ||
|
||
|
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 |
---|---|---|
|
@@ -18,9 +18,13 @@ | |
set(PROJECT_VENDOR "Open Risk") | ||
set(PROJECT_CONTACT "[email protected]") | ||
set(PROJECT_URL "https://github.com/open-risk/tailRisk") | ||
set(PROJECT_DESCRIPTION "tailRisk is a library for computing tail risk measures") | ||
|
||
cmake_minimum_required(VERSION 3.19) | ||
project(tailRisk) | ||
set(TAILRISK_VERSION_MAJOR 0) | ||
set(TAILRISK_VERSION_MINOR 2) | ||
set(TAILRISK_VERSION_PATCH 0) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_FLAGS -std=c++17) | ||
|
@@ -29,8 +33,7 @@ add_definitions("-std=c++17") | |
set(CMAKE_VERBOSE_MAKEFILE on) | ||
set(CMAKE_BUILD_TYPE Debug) | ||
set(CMAKE_CXX_FLAGS_DEBUG) | ||
#set(CONAN_DISABLE_CHECK_COMPILER ON) | ||
set(CMAKE_PREFIX_PATH ../cmake-build-debug) | ||
set(CMAKE_PREFIX_PATH cmake-build-debug) | ||
|
||
include_directories(..) | ||
include_directories(.) | ||
|
@@ -52,7 +55,7 @@ set(TEST_FILES | |
../testing/rnd_statistics/test_random_var_lognormal.cpp | ||
../testing/test_histogram.cpp) | ||
|
||
find_package(Poco REQUIRED COMPONENTS Foundation Net Util Data) | ||
find_package(Poco REQUIRED COMPONENTS Foundation Net NetSSL Util Data) | ||
find_package(Catch2 REQUIRED) | ||
find_package(Eigen3 REQUIRED) | ||
find_package(statslib REQUIRED) | ||
|
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
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