Install SQL Server and create a database on Ubuntu
Install packages
$ sudo apt install libopencv-dev python3-opencv
$ pip3 install opencv-python h5py Flask tqdm pandas sklearnClone the project
$ git clone http://hpcg.purdue.edu/git/civil.gitInstall the classifier SimpleClassifier/model_weights.h5
Run the server
$ python3 classifier.pyInstall .NET Core SDK 2.0.3 on Ubuntu
Install libgdiplus
$ sudo apt install libgdiplusClone the project
$ git clone http://hpcg.purdue.edu/git/civil.gitChange the connection string in appsettings.json
Server=xxx.xxx.xxx.xxx;Database=Sismique;User Id=SA;Password=Passw0rd;
Change the address of the classification server in ReportController.cs
Publish the application on Ubuntu
$ npm install
$ dotnet publish -c Release -r ubuntu.16.04-x64
$ cd bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish
$ dotnet Sismique.dll[OPTIONAL] Change the .NET Core RID
Host the application on Ubuntu
Development configuration for nginx: /etc/nginx/sites-available/sismique
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
auth_basic "ARIO";
auth_basic_user_file /home/mgaillard/civil/.htpasswd;
client_max_body_size 16M;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
}
}# Activate the new website
$ cd /etc/nginx/sites-enabled
$ sudo unlink default
$ sudo ln -s /etc/nginx/sites-available/sismique .
# Check syntax
$ sudo nginx -t
# Reload
$ sudo nginx -s reloadUpgrade to a newer version
$ git clean -dfx
$ git stash
$ git pull
$ git stash pop
$ dotnet publish -c Release -r ubuntu.16.04-x64