-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathDockerfileRockyLinux
70 lines (58 loc) · 3.6 KB
/
DockerfileRockyLinux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Install Rocky Linux image from docker hub.
FROM rockylinux/rockylinux:8 as rockylinux
# TODO Load this from an environmental/configuration file.
ENV PROJECT_HOME=/projectmetis-rc
# Just get the latest/updated libs for the current distribution.
# TODO clean at the end of the build process, because this one populates the cache.
RUN yum -y update
RUN yum -y groupinstall "Development Tools"
RUN yum -y install cmake3
RUN yum -y install autoconf
# Downaload and Set Devtoolset-9 for Palisades compilation.
RUN yum -y install gcc-toolset-9-gcc gcc-toolset-9-gcc-c++
RUN echo "source /opt/rh/gcc-toolset-9/enable" >> /etc/bashrc
SHELL ["/bin/bash", "--login", "-c"]
RUN export CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
# Download .repo file for bazel installation.
RUN cd /etc/yum.repos.d/ && { curl -O https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo; cd -; }
RUN yum -y install bazel4
# Download a python interpreter for the image.
RUN yum -y module install python38/build
RUN alternatives --set python /usr/bin/python3.8
# Final stage - yum clean up.
RUN yum clean all && rm -rf /var/cache/yum
# METIS configuration.
WORKDIR $PROJECT_HOME
COPY . .
# Run project configuration from root directory.
RUN chmod +x ./configure.sh && ./configure.sh
#RUN bazel query //... | xargs bazel build --incompatible_strict_action_env=true
#RUN bazel build --incompatible_strict_action_env=true //encryption/palisade/samples:test_palisade_hello_world
#RUN bazel run //encryption/palisade/samples:test_palisade_bgvrns_example
# Build all core projectmetis modules before publishing the docker image.
##RUN bazel query //... | grep -i -e "//encryption" | xargs bazel build
#RUN bazel query //... | grep -i -e "//projectmetis" | xargs bazel build
#RUN bazel query //... | grep -i -e "//projectmetis" | xargs bazel --output_user_root=/tmp/metis/bazel build
#RUN bazel --output_user_root=/tmp/metis/bazel build //...
#RUN bazel --output_user_root=/tmp/metis/bazel build --incompatible_strict_action_env=true //projectmetis/python/driver:initialize_controller
#RUN bazel --output_user_root=/tmp/metis/bazel build --incompatible_strict_action_env=true //projectmetis/python/driver:initialize_learner
#RUN bazel --output_user_root=/tmp/bazel build --incompatible_strict_action_env=true //projectmetis/python/driver:initialize_controller
#RUN bazel --output_user_root=/tmp/bazel build --incompatible_strict_action_env=true //projectmetis/python/driver:initialize_learner
#RUN bazel build --incompatible_strict_action_env=true //projectmetis/python/driver:initialize_controller
#RUN bazel build --incompatible_strict_action_env=true //projectmetis/python/driver:initialize_learner
#RUN bazel build --incompatible_strict_action_env=true //projectmetis/python/driver:initialize_controller
#RUN bazel build --incompatible_strict_action_env=true //projectmetis/python/driver:initialize_controller
#RUN bazel build --incompatible_strict_action_env=true //projectmetis/python/driver:initialize_learner
#RUN bazel --output_user_root=/tmp/metis/bazel run //projectmetis/python/driver:initialize_learner
#RUN bazel --output_user_root=/tmp/metis/bazel build --disk_cache=/tmp/metis/bazel //projectmetis/python/driver:initialize_learner
#RUN cd /$PROJECT_HOME
#RUN bazel --output_user_root=/tmp/metis/bazel build //projectmetis/python/driver:initialize_learner
# bazel --output_base=/tmp/metis/bazel
# build --disk_cache=/tmp/metis/bazel
#FROM l.gcr.io/google/bazel:latest
#RUN apt update && apt upgrade -y && apt clean
#RUN apt-get install -y python3-venv
#WORKDIR $PROJECT_HOME
#COPY . .
#RUN rm -rf python/metisvenv
#RUN /usr/bin/python3 -m venv python/metisvenv