File: install_tensorflow.sh

package info (click to toggle)
cp2k 2025.2-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 372,052 kB
  • sloc: fortran: 963,262; ansic: 64,495; f90: 21,676; python: 14,419; sh: 11,382; xml: 2,173; makefile: 953; pascal: 845; perl: 492; cpp: 345; lisp: 297; csh: 16
file content (30 lines) | stat: -rwxr-xr-x 546 bytes parent folder | download | duplicates (4)
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
#!/bin/bash -e

# author: Ole Schuett

if (($# != 1)); then
  echo "Usage: install_tensorflow.sh <BASE_IMAGE>"
  exit 1
fi

BASE_IMAGE=$1

echo "Installing Tensorflow..."

if [[ ${BASE_IMAGE} == ubuntu* ]]; then
  apt-get update -qq
  apt-get install -qq --no-install-recommends python3-pip
  rm -rf /var/lib/apt/lists/*
  pip install --quiet tensorflow

elif [[ ${BASE_IMAGE} == fedora* ]]; then
  dnf -qy install python3-pip
  dnf clean -q all
  pip install --quiet tensorflow

else
  echo "Unknown base image: ${BASE_IMAGE}"
  exit 1
fi

#EOF