1 # Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
19 # Install 'add-apt-repository'
20 RUN apt-get update && apt-get -qqy install software-properties-common
23 RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf
26 RUN apt-get update && apt-get -qqy install fakeroot devscripts debhelper python3-all dh-python
28 # Install extra dependencies (Caffe, nnkit)
29 RUN apt-get update && apt-get -qqy install libboost-all-dev libgflags-dev libgoogle-glog-dev libatlas-base-dev libhdf5-dev
31 # Install protocol buffer
32 RUN apt-get update && apt-get -qqy install libprotobuf-dev protobuf-compiler
35 # TODO install clang-format (No official clang-format-8 package for ubuntu jammy)
36 RUN apt-get update && \
37 DEBIAN_FRONTEND=noninteractive \
38 apt-get -qqy install doxygen graphviz wget zip unzip python3 python3-pip python3-venv python3-dev hdf5-tools pylint curl
39 RUN python3 -m pip install --upgrade pip
40 RUN python3 -m pip install yapf==0.22.0 numpy flatbuffers
42 # Install google test (source)
43 RUN apt-get update && apt-get -qqy install libgtest-dev
45 # TODO: Install gbs & sdb
46 # gbs & sdb are not support ubuntu jammy yet
48 # Setup user to match host user, and give superuser permissions
50 ARG GROUP_ID=${USER_ID}
51 RUN apt-get update && apt-get -qqy install sudo
52 RUN addgroup --gid ${GROUP_ID} ubuntu && adduser --disabled-password --gecos '' --uid ${USER_ID} --gid ${GROUP_ID} ubuntu && usermod -aG sudo ubuntu
53 RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
54 RUN echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
56 # Clean archives (to reduce image size)
59 # Set user to the one we just created