Skip to content

Commit 68767a8

Browse files
committed
refine dockerfile
Signed-off-by: Lei Wang <[email protected]>
1 parent b8c27bd commit 68767a8

File tree

5 files changed

+39
-69
lines changed

5 files changed

+39
-69
lines changed

Dockerfile

+8-17
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Example:
16-
# docker rm gart0; docker image rm gart
17-
# docker build -t gart .
18-
# docker run -it --name gart0 gart
19-
2015
FROM ubuntu:22.04
2116

2217
# Define build type (All, Converter, Writer, Analyzer, Controller)
2318
ARG build_type=All
2419

25-
RUN apt-get update && apt-get install -y \
26-
build-essential \
27-
cmake \
20+
RUN apt-get update && apt-get install -y --no-install-recommends \
2821
git \
29-
lsb-release \
3022
sudo \
31-
python3 \
32-
python3-pip \
33-
vim \
34-
wget \
3523
netcat-openbsd \
3624
curl \
3725
&& rm -rf /var/lib/apt/lists/*
@@ -40,7 +28,7 @@ WORKDIR /workspace
4028
RUN touch env_script.sh
4129

4230
RUN if [ "$build_type" = "All" ]; then \
43-
apt-get update && apt-get install -y \
31+
apt-get update && apt-get install -y --no-install-recommends \
4432
openssh-server \
4533
&& rm -rf /var/lib/apt/lists/* \
4634
&& mkdir -p /var/run/sshd \
@@ -69,10 +57,13 @@ RUN if [ "$build_type" = "Controller" ]; then \
6957
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
7058
chmod +x ./kubectl && \
7159
mv ./kubectl /usr/local/bin/kubectl && \
72-
apt-get update && apt-get install -y openmpi-bin libopenmpi-dev maven && \
60+
apt-get update && apt-get install -y --no-install-recommends openmpi-bin libopenmpi-dev maven python3 python3-pip && \
7361
rm -rf /var/lib/apt/lists/* && \
74-
pip3 install tenacity==8.3.0 && \
75-
pip3 install flask kubernetes etcd3; \
62+
pip3 install --no-cache-dir tenacity==8.3.0 && \
63+
pip3 install --no-cache-dir flask kubernetes etcd3; \
64+
apt-get remove -y maven; \
65+
apt-get autoremove -y; \
66+
rm -rf /root/.m2; \
7667
git clone https://github.com/oracle/pgql-lang.git; \
7768
cd pgql-lang; \
7869
sh install.sh; \

charts/gart/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,6 @@ dataconfig:
262262
useGAE: 0
263263
# defaultMaxVertexNum: 67108864
264264
# defaultMaxMemUsage: 10737418240
265-
# customMemConfig: TITLE:67108861:1073741824,NAME:67108861:1073741824
265+
# customMemConfig: CAST_INFO:67108864:85899345920,COMPLETE_CAST:67108864:85899345920
266266
# set the number of threads for converter, if unset, use the default value 4
267267
# numThreadsForConverter: 4

k8s/dockerfiles/interactive.Dockerfile

+10-31
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@ ARG CI=false
99

1010
ARG profile=release
1111
ENV profile=$profile
12-
RUN git clone https://github.com/alibaba/GraphScope.git /home/graphscope/GraphScope
13-
14-
RUN cd /home/graphscope/GraphScope/ && \
15-
if [ "${CI}" = "true" ]; then \
16-
cp -r artifacts/interactive /home/graphscope/install; \
17-
else \
18-
mkdir /home/graphscope/install; \
19-
. /home/graphscope/.graphscope_env; \
20-
make interactive-install BUILD_TYPE="$profile" INSTALL_PREFIX=/home/graphscope/install; \
21-
fi
2212

2313
############### RUNTIME: frontend #######################
2414
# FROM ubuntu:22.04 AS frontend
@@ -33,22 +23,15 @@ USER root
3323

3424
RUN apt-get update && \
3525
apt-get install -y --no-install-recommends \
36-
sudo default-jdk tzdata python3-pip \
37-
git build-essential cmake curl maven \
38-
libssl-dev libclang-dev openmpi-bin libopenmpi-dev libprotobuf-dev protobuf-compiler-grpc \
39-
libgrpc-dev libgrpc++-dev libboost-all-dev && \
26+
default-jdk tzdata python3-pip \
27+
git build-essential cmake curl libboost-all-dev \
28+
libssl-dev libgrpc-dev libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc && \
4029
apt-get clean && \
4130
rm -rf /var/lib/apt/lists/*
4231

4332
ENV PATH=/root/.cargo/bin:$PATH
4433

45-
RUN python3 -m pip install --no-cache-dir vineyard vineyard-io etcd3 --user
46-
47-
COPY --from=builder /home/graphscope/install/conf /opt/graphscope/conf
48-
49-
RUN mkdir -p /var/log/graphscope \
50-
&& chown -R graphscope:graphscope /var/log/graphscope
51-
RUN chmod a+wrx /tmp
34+
RUN python3 -m pip install --no-cache-dir etcd3 --user
5235

5336
RUN git clone https://github.com/microsoft/cpprestsdk.git \
5437
&& cd cpprestsdk \
@@ -81,9 +64,14 @@ RUN git clone https://github.com/microsoft/cpprestsdk.git \
8164

8265
WORKDIR /home/graphscope
8366
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
67+
&& apt-get update \
68+
&& apt-get install -y --no-install-recommends maven \
8469
&& git clone https://github.com/doudoubobo/GraphScope.git -b gart-gie-grin /home/graphscope/GraphScope \
8570
&& cd /home/graphscope/GraphScope/interactive_engine/compiler \
8671
&& make build \
72+
&& apt-get remove -y maven \
73+
&& apt-get clean \
74+
&& rm -rf /var/lib/apt/lists/* \
8775
&& rm -rf /home/graphscope/GraphScope/.git \
8876
&& rm -rf /home/graphscope/GraphScope/docs \
8977
&& rustup self uninstall -y \
@@ -106,21 +94,12 @@ ENV RUST_BACKTRACE=1
10694

10795
RUN apt-get update -y && \
10896
apt-get install -y python3-pip curl git \
109-
build-essential cmake libssl-dev libclang-dev openmpi-bin libopenmpi-dev \
97+
build-essential cmake libssl-dev \
11098
libgrpc-dev libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc libboost-all-dev && \
11199
apt-get clean -y && rm -rf /var/lib/apt/lists/*
112100

113101
ENV PATH=/root/.cargo/bin:$PATH
114102

115-
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
116-
env arch=$arch curl -L -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.19.2/bin/linux/$arch/kubectl
117-
RUN chmod +x /usr/bin/kubectl
118-
119-
# vineyard.executor.properties, log configuration files
120-
COPY --from=builder /home/graphscope/install/conf /opt/graphscope/conf
121-
122-
RUN chmod a+wrx /tmp /var/tmp
123-
124103
RUN python3 -m pip install --no-cache-dir vineyard vineyard-io flask --user
125104

126105
WORKDIR /home/graphscope

scripts/install-deps.sh

+18-19
Original file line numberDiff line numberDiff line change
@@ -64,26 +64,25 @@ echo "Now in directory $(pwd). Executing commands..."
6464

6565
sudo apt update
6666

67-
sudo apt-get install -y build-essential cmake python3 python3-pip lsb-release wget
68-
sudo apt-get install -y etcd
67+
sudo apt-get install -y --no-install-recommends build-essential cmake python3 python3-pip lsb-release wget etcd
6968

7069
if [ "$ROLE" == "All" ]; then
7170
if ! command -v javac &> /dev/null; then
7271
echo "JDK not installed. Installing JDK..."
73-
sudo apt-get install -y default-jdk
72+
sudo apt-get install -y --no-install-recommends default-jdk
7473
fi
7574
fi
7675

7776
if [ "$ROLE" == "All" ] || [ "$ROLE" == "Analyzer" ]; then
78-
sudo apt-get install -y libmsgpack-dev
77+
sudo apt-get install -y --no-install-recommends libmsgpack-dev
7978
fi
8079

8180
# gflags and glog
82-
sudo apt-get install -y libgflags-dev libgoogle-glog-dev
81+
sudo apt-get install -y --no-install-recommends libgflags-dev libgoogle-glog-dev
8382

8483
# etcd-client
85-
sudo apt-get install -y libboost-all-dev libssl-dev
86-
sudo apt-get install -y libgrpc-dev \
84+
sudo apt-get install -y --no-install-recommends libboost-all-dev libssl-dev
85+
sudo apt-get install -y --no-install-recommends libgrpc-dev \
8786
libgrpc++-dev \
8887
libprotobuf-dev \
8988
protobuf-compiler-grpc
@@ -134,35 +133,33 @@ fi
134133

135134
if [ "$ROLE" != "Analyzer" ]; then
136135
# YAML for Python
137-
pip3 install pyyaml
136+
pip3 install --no-cache-dir pyyaml
138137
fi
139138

140139
if [ "$ROLE" != "Analyzer" ]; then
141140
# librdkafka
142-
sudo apt-get install -y librdkafka-dev
141+
sudo apt-get install -y --no-install-recommends librdkafka-dev
143142
fi
144143

145144
# Install sqlalchemy, pymysql, psycopg2
146145
# for psycopg2, you need to install libpq-dev
147146

148-
sudo apt-get install -y libpq-dev
149-
pip3 install tenacity==8.3.0
150-
pip3 install sqlalchemy pymysql psycopg2 etcd3 libclang
147+
sudo apt-get install -y --no-install-recommends libpq-dev
148+
pip3 install --no-cache-dir tenacity==8.3.0
149+
pip3 install --no-cache-dir sqlalchemy pymysql psycopg2 etcd3 libclang
151150

152151
if [ "$ROLE" == "All" ]; then
153152
# Install requirements-dev.txt for docs
154153
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
155154
REQUIREMENTS_FILE="$SCRIPT_DIR/../requirements-dev.txt"
156-
pip3 install -r $REQUIREMENTS_FILE
155+
pip3 install --no-cache-dir -r $REQUIREMENTS_FILE
157156
fi
158157

159158
# vineyard
160-
sudo apt-get install -y ca-certificates \
161-
libboost-all-dev \
159+
sudo apt-get install -y --no-install-recommends ca-certificates \
162160
libcurl4-openssl-dev \
163161
openmpi-bin \
164162
libopenmpi-dev \
165-
libssl-dev \
166163
libunwind-dev \
167164
libz-dev \
168165
automake \
@@ -177,6 +174,8 @@ sudo apt install -y libarrow-dev=14.0.1-1 \
177174
libarrow-flight-dev=14.0.1-1 \
178175
libgandiva-dev=14.0.1-1 \
179176
libparquet-dev=14.0.1-1
177+
sudo apt clean
178+
rm -rf /var/lib/apt/lists/*
180179

181180
git clone https://github.com/v6d-io/v6d
182181
cd v6d
@@ -222,14 +221,14 @@ fi
222221

223222
if [ "$ROLE" == "All" ] || [ "$ROLE" == "Analyzer" ]; then
224223
# rapidjson
225-
sudo apt-get install -y rapidjson-dev
224+
sudo apt-get install -y --no-install-recommends rapidjson-dev
226225
fi
227226

228-
pip3 install grpcio grpcio-tools mypy-protobuf requests paramiko
227+
pip3 install --no-cache-dir grpcio grpcio-tools mypy-protobuf requests paramiko
229228

230229
if [ "$ROLE" == "All" ] || [ "$ROLE" == "Analyzer" ]; then
231230
# required python modules
232-
pip3 install msgpack networkx
231+
pip3 install --no-cache-dir msgpack networkx
233232
fi
234233

235234
if [ "$ROLE" == "All" ]; then

vegito/src/graph/graph_store.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ void GraphStore::add_vgraph(uint64_t vlabel, RGMapping* rg_map) {
259259
new seggraph::SegGraph(rg_map, vlabel, block_size, num_vertex);
260260

261261
// add outer CSR and its schema
262-
ov_seg_graphs_[vlabel] = new seggraph::SegGraph(rg_map, vlabel);
262+
ov_seg_graphs_[vlabel] = new seggraph::SegGraph(rg_map, vlabel, block_size,
263+
num_vertex);
263264
#endif
264265

265266
auto& blob_schema = seg_graphs_[vlabel]->get_blob_schema();

0 commit comments

Comments
 (0)