forked from NoahGWood/OpenEFT
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_docker.sh
60 lines (45 loc) · 1.57 KB
/
build_docker.sh
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
# This is untested!
#!/usr/bin/bash
mkdir build
mkdir -p browser/linux
echo "Updating Submodules"
git submodule update
echo "Setting Up NBIS"
# Remove any old copies of NBIS
sudo rm -rf ./nbis
git clone https://github.com/Robbbbbbbbb/nbis ./nbis
cd nbis
./setup.sh ${PWD}/../build --64
echo "Configuring NBIS"
make config
echo "Making NBIS"
make it
echo "Installing NBIS"
sudo make install LIBNBIS=no
echo "Checking NBIS binaries paths"
case :$PATH:
in *:$HOME/OpenEFT/nbis/nfseg/bin:*) ;; # do nothing, it's there
*) echo 'export PATH="$HOME/OpenEFT/nbis/nfseg/bin:$PATH"' >> ~/.bashrc #it's missing, add to PATH
esac
case :$PATH:
in *:$HOME/OpenEFT/nbis/nfiq/bin:*) ;; # do nothing, it's there
*) echo 'export PATH="$HOME/OpenEFT/nbis/nfiq/bin:$PATH"' >> ~/.bashrc #it's missing, add to PATH
esac
# Install the necessary tools
echo "Installing LibOpenJP2-Tools"
sudo apt-get install libopenjp2-tools -y
sudo apt-get install libgl1-mesa-glx -y
# Move to browser directory and set up chromium
cd ../browser/linux
wget "https://github.com/clickot/ungoogled-chromium-binaries/releases/download/111.0.5563.65-1/ungoogled-chromium_111.0.5563.65-1.1.AppImage"
mv ungoogled-chromium_111.0.5563.65-1.1.AppImage chrome.AppImage
cd ../../
# Install Python dependencies
echo "Installing Pip Requirements"
pip3 install -r requirements.txt
# Migrate Django (similar to Windows build)
echo "Running Django Migrations"
python3 manage.py migrate
echo "OpenEFT build complete. Update your PATH by typing 'source ~/.bashrc' and run the app by typing 'python3 openeft.py'"
cd ~/OpenEFT
. ~/.bashrc