-
Notifications
You must be signed in to change notification settings - Fork 3
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 and Dev Container setups)
Install Docker Engine by following the official documentation: https://docs.docker.com/engine/install/ubuntu/.
-
Install Python3 (for Python setups)
Python is typically installed by default on Ubuntu. You can verify this by running
python3 --version
.sudo apt install python3
For local installations without Docker, a Python virtual environment (venv) is needed.
sudo apt install python3.10-venv
-
Clone this repository
git clone https://github.com/RastonLab/Virtual-FTIR-Functions.git
-
Move into cloned directory
cd Virtual-FTIR-Functions
-
Create image
docker build -t ftir-api .
-
Build container
docker run -p 5000:5000 --name back-end ftir-api
-
Once running, visit localhost ("Raston Lab FTIR API – Version 0.0.0" should be present)
http://localhost:5000/
-
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-Functions.git
-
Move into cloned directory
cd Virtual-FTIR-Functions
-
Create Python virtual environment (venv)
python3 -m venv venv
-
Activate venv
source venv/bin/activate
-
Install dependencies from
scripts/requirements.txt
pip3 install -r ./scripts/requirements.txt
-
Start application
python3 app.py
or
python3 wsgi.py
-
Once running, visit localhost ("Raston Lab FTIR API – Version 0.0.0" should be present)
http://localhost:5000/
-
Install the Dev Containers Visual Studio Code extension
-
Clone this repository
git clone https://github.com/RastonLab/Virtual-FTIR-Functions.git
-
Open the repository in a Dev Container. When opened, all dependencies will be automatically installed. This installation process does not repeat unless one of the
.devcontainer
configuration files change or it is manually triggered (Dev Containers: Rebuild Container
)-
(Option 1) Open the repository in VS Code either in your native OS or WSL. Once open, in the bottom-right, a message should appear prompting the user to open the repository in a container.
-
(Option 2) Open the
Command Palette
, search and select the option:Dev Containers: Open Folder in Container...
. Navigate and select the cloned repository's directory.
-
-
Start application
python3 app.py
or
python3 wsgi.py
-
Once running, visit localhost ("Raston Lab FTIR API – Version 0.0.0" should be present)
http://localhost:5000/