-
Notifications
You must be signed in to change notification settings - Fork 5
Local Installation
The following guide will follow the steps of setting up an offline version of FTIR-SIS. These steps were tested and verified on an Ubuntu 22.04 virtual machine on 1st January 2024. Operating systems, toolkits, libraries, dependencies, and conventions change constantly. While the processes below will likely be similar in the future, things will inevitably change. At the Raston Lab, we strive to keep our documentation current, but things slip through the cracks. The best way to keep an open and public conversation about these issues would be to report directly to the associated repository on GitHub.
The following should happen before attempting to run the FTIR-SIS. Depending on the approach selected, you may not need to perform all the prerequisite steps.
-
Update operating system
sudo apt update
sudo apt upgrade
-
Install git
sudo apt install git
git --version
-
Install Docker Engine (for Docker setups)
Install Docker Engine by following the official documentation: https://docs.docker.com/engine/install/ubuntu/.
-
Install Node Version Manager (nvm) and Node.js (for Node.js setups)
Install nvm by following the official documentation: https://github.com/nvm-sh/nvm#install--update-script.
Install Node.js using the following commands
nvm install --lts
node --version
-
Clone this repository
git clone https://github.com/RastonLab/Virtual-FTIR-Spectrometer.git
-
Move into cloned directory
cd Virtual-FTIR-Spectrometer -
Edit
src/dictionaries/constants.jsto use proper API URLs (if setting up API locally, use localhost)export const FIND_PEAKS = "http://localhost:5000/find_peaks"; export const BACKGROUND = "http://localhost:5000/background"; export const SAMPLE = "http://localhost:5000/sample";
-
Create image
docker build -t ftir-gui . -
Build container
docker run -p 3000:3000 --name front-end ftir-gui
-
Once running, visit localhost (user interface should be present)
http://localhost:3000/
-
List containers
docker ps -a
-
Stop container
docker stop [NAME]
-
Delete container
docker rm [NAME]
-
List images
docker images
-
Delete image
docker image rm [IMAGE-ID]
-
Clone this repository
git clone https://github.com/RastonLab/Virtual-FTIR-Spectrometer.git
-
Move into cloned directory
cd Virtual-FTIR-Spectrometer -
Edit
src/dictionaries/constants.jsto use proper API URLs (if setting up API locally, use localhost)export const FIND_PEAKS = "http://localhost:5000/find_peaks"; export const BACKGROUND = "http://localhost:5000/background"; export const SAMPLE = "http://localhost:5000/sample";
-
Install dependencies
npm install
-
Start applications
npm start
-
Once running, visit localhost (user interface should be present)
http://localhost:3000/