-
Flavio TARSETTI authored
Closes #156
Flavio TARSETTI authoredCloses #156
Installation
This section includes information for installing beat.editor
a couple different ways.
Method 1: Virtualbox Image (easiest)
This method is the easiest - one command will generate a new Virtualbox image with beat.editor
installed.
Requirements
- Working internet connection
- Virtualbox installed and working (might need configuration)
- Packer installed
- About 3G of disk space (at the time of writing, 2.7G needed)
- Git
Installation Steps
-
Clone the repository holding the scripts:
$ git clone https://gitlab.idiap.ch/beat/beat.tutorial.git
-
Change directory to the folder holding the scripts:
$ cd beat.tutorial/packer_scripts
-
Generate the Virtualbox image:
$ packer-io build ubuntu-18.04-beat.json
This will generate the OVF file in packer_scripts/output-virtualbox-iso
.
To use this OVF file in the Virtualbox GUI, select "Import Appliance" under the "File" menu in Virtualbox and choose to import the OVF file.
The username and password for the image are both beat
.
The BEAT commands, beat
and beat editor serve
, should be available in the shell in the VM. The Firefox browser is available, as is the Vim, Emacs, Nano, and Gedit editors.
Method 2: Conda (easyish)
This method integrates with one of your Conda environments' packages on your local machine, but has more strict requirements.
Requirements
- Linux or MacOS (Docker features not available on MacOS for now)
- Working internet connection
- Useable Conda setup (see Bob's documentation on it)
- Firefox or Chrome browser
- Docker installed and available to the current user (not strictly necessary)
Installation Steps
-
Activate the Conda environment you will be adding
beat.editor
to -
Add two new Conda channels:
$ conda config --env --add channels https://www.idiap.ch/software/beat/conda/label/beta $ conda config --env --add channels https://www.idiap.ch/software/beat/conda
-
Install the
beat.editor
package:$ conda install beat.editor
-
The BEAT commands,
beat
andbeat editor serve
, should be available.
Method 3: For developers
This method is for developers looking to work on beat.editor
.
Requirements
- Linux or MacOS
- Working internet connection
- Useable Conda setup (see Bob's documentation on it)
- Up-to-date Firefox and Chrome browsers (both need headless support, a relatively recent feature)
- Docker installed and available to the current user
- A relatively recent version of NodeJS & NPM.
Installation Steps
-
Clone the
beat.editor
repository:$ git clone git@gitlab.idiap.ch:beat/beat.editor.git
-
Clone the
bob.admin
repository, necessary for building a development Conda environment:$ git clone git@gitlab.idiap.ch:bob/bob.admin.git
-
Use
bob.admin
to create a development Conda environment namedbeatedit
for Python 3.6:$ conda activate base $ conda install pyyaml # install a dependency that isn't fetched by default $ cd beat.editor $ ../bob.admin/conda/conda-bootstrap.py --overwrite --python=3.6 beatedit
-
Activate the created environment and use the
buildout
command frombob.buildout
in the new environment to generate the executables forbeat.editor
:$ conda activate beatedit $ buildout
-
Note for development mode: Add the line
dependent-scripts = true
then use thebuildout
command to ensure to generate all the executables in thebin/
folder evenbeat
forbeat.editor
:$ buildout
-
In
bin/
you should several new executables for the project. The Python setup part is done. -
Go into the root folder for the Javascript and install the dependencies via NPM:
$ cd conda/js $ npm install
-
Test the JS to make sure everything is working properly:
$ npm test
-
Assuming the tests pass, you can start the development webpack server:
$ npm start
-
In a separate terminal tab/window, go back to the root of the
beat.editor
project and run the web server in development mode:$ ./bin/beat editor serve --dev
-
You should now be able to go
localhost:9101
in your browser to see thebeat.editor
web app, now served by the webpack dev server.