Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

Commit a510dbe

Browse files
Added all examples to vscode cmake, removed tutorial (#143)
* Added all examples to vscode cmake, removed tutorial * pinning the code server version 3.9.1 for now * setting the fedora s390 version to run code-server 3.9.1 version * tell it not to cache Co-authored-by: Gregory Boland <boland@us.ibm.com>
1 parent 9a5e097 commit a510dbe

File tree

9 files changed

+69
-12
lines changed

9 files changed

+69
-12
lines changed

Dockerfile.CENTOS-amd64.Toolkit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ USER root
1515
WORKDIR /root
1616

1717
# Install code-server so we can access the IDE from a container context...
18-
RUN curl -fsSL https://code-server.dev/install.sh | sh 2>&1
18+
#RUN curl -fsSL https://code-server.dev/install.sh | sh 2>&1
19+
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 3.9.1 2>&1
1920
#Install cpptools from the latest vsix version which we are pinning to becuase we have issues getting it to install normally - 12.03.2020 - greg
2021
ADD https://github.com/microsoft/vscode-cpptools/releases/download/1.1.2/cpptools-linux.vsix /opt/IBM/FHE-Workspace/
2122

Dockerfile.FEDORA-amd64.Toolkit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ USER root
1515
WORKDIR /root
1616

1717
# Install code-server so we can access the IDE from a container context...
18-
RUN curl -fsSL https://code-server.dev/install.sh | sh 2>&1
18+
#RUN curl -fsSL https://code-server.dev/install.sh | sh 2>&1
19+
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 3.9.1 2>&1
1920
#Install cpptools from the latest vsix version which we are pinning to becuase we have issues getting it to install normally - 12.03.2020 - greg
2021
ADD https://github.com/microsoft/vscode-cpptools/releases/download/1.1.2/cpptools-linux.vsix /opt/IBM/FHE-Workspace/
2122

Dockerfile.FEDORA-s390x.Toolkit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ RUN cp -pr ./node-v12.18.2-linux-s390x/bin \
3535
/usr/local
3636

3737
# Install code-server so we can access vscode from a container context...
38-
RUN curl -fsSL https://code-server.dev/install.sh | sh 2>&1
38+
#RUN curl -fsSL https://code-server.dev/install.sh | sh 2>&1
39+
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 3.9.1
3940

4041
# Create a directory to hold the VSCode user data when running as root
4142
RUN mkdir -p /opt/IBM/IDE-Data

Dockerfile.UBUNTU-amd64.Toolkit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ WORKDIR /root
1818
RUN export DEBIAN_FRONTEND=noninteractive
1919

2020
# Install code-server so we can access the IDE from a container context...
21-
RUN curl -fsSL https://code-server.dev/install.sh | sh
21+
#RUN curl -fsSL https://code-server.dev/install.sh | sh
22+
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 3.9.1
23+
2224
#Install cpptools from the latest vsix version which we are pinning to becuase we have issues getting it to install normally - 12.03.2020 - greg
2325
ADD https://github.com/microsoft/vscode-cpptools/releases/download/1.1.2/cpptools-linux.vsix /opt/IBM/FHE-Workspace/
2426

Dockerfile.UBUNTU-s390x.Toolkit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ RUN cp -pr ./node-v12.18.2-linux-s390x/bin \
3636
/usr/local
3737

3838
# Install code-server so we can access vscode from a container context...
39-
RUN curl -fsSL https://code-server.dev/install.sh | sh 2>&1
39+
#RUN curl -fsSL https://code-server.dev/install.sh | sh 2>&1
40+
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 3.9.1 2>&1
4041

4142
# Create a directory to hold the VSCode user data when running as root
4243
RUN mkdir -p /opt/IBM/IDE-Data

IDE_Config/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"terminal.integrated.shell.linux": "/usr/bin/bash",
3-
"cmake.sourceDirectory": "${workspaceFolder}/examples/BGV_world_country_db_lookup",
3+
"cmake.sourceDirectory": "${workspaceFolder}/examples",
44
"cmake.configureOnOpen": true,
55
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
66
}

samples/BGV_world_country_db_lookup/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
cmake_minimum_required(VERSION 3.10)
2626

27-
project(BGV_world_country_db_lookup VERSION 0.0.1 LANGUAGES CXX)
27+
project(1-PrivacyPreservingKeyValueSearch-BGV VERSION 0.0.1 LANGUAGES CXX)
2828
set(CMAKE_CXX_STANDARD 17)
2929
set(CMAKE_BUILD_TYPE Debug)
3030
set(CMAKE_CXX_FLAGS "-Werror -fopenmp -Wfatal-errors")
@@ -37,5 +37,5 @@ find_package(Boost 1.72.0 EXACT REQUIRED COMPONENTS filesystem system thread)
3737
find_package(HDF5 REQUIRED COMPONENTS CXX)
3838
include_directories(${HDF5_INCLUDE_DIR})
3939

40-
add_executable(BGV_world_country_db_lookup BGV_world_country_db_lookup.cpp)
41-
target_link_libraries(BGV_world_country_db_lookup mlhelib helib ${Boost_LIBRARIES})
40+
add_executable(1-PrivacyPreservingKeyValueSearch-BGV BGV_world_country_db_lookup.cpp)
41+
target_link_libraries(1-PrivacyPreservingKeyValueSearch-BGV mlhelib helib ${Boost_LIBRARIES})

samples/CKKS_credit_card_fraud/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
cmake_minimum_required(VERSION 3.10)
2626

27-
project(CKKS_credit_card_fraud VERSION 0.0.1 LANGUAGES CXX)
27+
project(2-CreditCardFraudDetectionInferencing-CKKS VERSION 0.0.1 LANGUAGES CXX)
2828
set(CMAKE_CXX_STANDARD 17)
2929
set(CMAKE_BUILD_TYPE Release)
3030
set(CMAKE_CXX_FLAGS "-Werror -fopenmp -Wfatal-errors")
@@ -37,5 +37,5 @@ find_package(Boost 1.72.0 EXACT REQUIRED COMPONENTS filesystem system thread)
3737
find_package(HDF5 REQUIRED COMPONENTS CXX)
3838
include_directories(${HDF5_INCLUDE_DIR})
3939

40-
add_executable(CKKS_credit_card_fraud CKKS_credit_card_fraud_helib.cpp ClientServer.cpp)
41-
target_link_libraries(CKKS_credit_card_fraud mlhelib helib ${HDF5_LIBRARIES} ${Boost_LIBRARIES})
40+
add_executable(2-CreditCardFraudDetectionInferencing-CKKS CKKS_credit_card_fraud_helib.cpp ClientServer.cpp)
41+
target_link_libraries(2-CreditCardFraudDetectionInferencing-CKKS mlhelib helib ${HDF5_LIBRARIES} ${Boost_LIBRARIES})

samples/CMakeLists.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright (C) 2020 IBM Corp.
2+
# This program is Licensed under the Apache License, Version 2.0
3+
# (the "License"); you may not use this file except in compliance
4+
# with the License. You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License. See accompanying LICENSE file.
11+
12+
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
13+
14+
## Use -std=c++17 as default.
15+
set(CMAKE_CXX_STANDARD 17)
16+
## Disable C++ extensions
17+
set(CMAKE_CXX_EXTENSIONS OFF)
18+
## Require full C++ standard
19+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
20+
21+
# cmake_minimum_required(VERSION 3.10)
22+
23+
set(CMAKE_BUILD_TYPE Debug)
24+
set(CMAKE_CXX_FLAGS "-Werror -fopenmp -Wfatal-errors")
25+
26+
# Define standard installation directories (GNU)
27+
include(GNUInstallDirs)
28+
29+
# Set default output folder
30+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
31+
"${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
32+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
33+
"${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
34+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
35+
"${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
36+
37+
38+
39+
## Rely on the Environment variable to dictate which version of helib to use
40+
set(HELIB_VERSION ${HELIB_CMAKE_LISTS_VERSON})
41+
42+
find_package(helib ${HELIB_VERSION} REQUIRED)
43+
find_package(Boost 1.72.0 EXACT REQUIRED COMPONENTS filesystem system thread)
44+
find_package(HDF5 REQUIRED COMPONENTS CXX)
45+
include_directories(${HDF5_INCLUDE_DIR})
46+
47+
add_subdirectory(BGV_binary_arithmetic)
48+
add_subdirectory(BGV_world_country_db_lookup)
49+
add_subdirectory(BGV_packed_arithmetic)
50+
# add_subdirectory(tutorial)
51+
add_subdirectory(CKKS_credit_card_fraud)

0 commit comments

Comments
 (0)