LARA

Setup

This document describes how to properly setup your computer for the programming assignments. It is composed of the following parts:

  1. Installing the JDK
  2. Installing sbt
  3. Connecting to the Grading Website
  4. Generating SSH Keys
  5. Installing Git

Installing the JDK

For the programming assignments, you will need to instlal the Java Development Kit, version 1.8. Check you have the right version by typing in the console:

java -version

Linux

  1. Ubuntu, Debian: To install the JDK using apt-get, execute the following command in a terminal: sudo apt-get install openjdk-8-jdk
  2. Fedora, Oracle, Red Had: To install the JDK using yum, execute the following command in a terminal su -c "yum install java-1.8.0-openjdk-devel"
  3. Manual Installation: To install the JDK manually on a Linux system, follow these steps:
    1. Download the .tar.gz archive from the Oracle website
    2. Unpack the downloaded archive to a directory of your choice
    3. Add the bin/ directory of the extracted JDK to the PATH environment variable. Open the file ~/.bashrc in an editor (create it if it doesn't exist) and add the following line: export PATH="/PATH/TO/YOUR/jdk1.8.0-VERSION/bin:$PATH"
    4. If you are using another shell, add that line in the corresponding configuration file (e.g. ~/.zshrc for zsh).
Verify your setup

Open a new terminal (to apply the changed ~/.bashrc in case you did the manual installation) and type java -version. If you have problems installing the JDK, ask for help on the Moodle forums or ask the assistants.

Mac OS X

Mac OS X either comes with a pre-installed JDK, or installs it automatically.

To verify your JDK installation, open the Terminal application in /Applications/Utilities/ and type java -version. If the JDK is not yet installed, the system will ask you if you would like to download and install it. Make sure you install Java 1.8.

Windows

  1. Download the JDK installer for Windows from the Oracle website.
  2. Run the installer.
  3. Add the bin directory of the installed JDK to the PATH environment variable, as described here.

To verify the JDK installation, open the Command Prompt and type java -version. If you run into any problem, go to the official Oracle documentation.

Installing sbt

sbt is the build tool used to compile Scala code, to install it follow the appropriate instructions:

Connecting to the Grading Website

The grading infrastructure for the projects will be hosted on larasrv13.epfl.ch. This website is only accessible on the EPFL network. If you ever need to access this website from outside EPFL, please use the VPN.

On this website, you will be asked to login using your GASPAR account. Once this is done, select “Parallelism and Concurrency” from the list of courses.
The first time you log in to the course, you will be asked to create a group (of 1…). To do so, simply follow the simple instructions on the website.

You will use this website throughout the semester to submit your projects and to receive the project grades.

Generating SSH Keys

In order to be able to submit your code to the website, you will be asked to enter your public key in the web interface. If you do not already have a private/public key combination for your computer, follow these instructions to create one. We provide different instructions depending on your operating system. Note that you typically generate one key pair per computer that you use.

Linux & Mac OS X

From the command line, type the following command:

ssh-keygen -t rsa -b 2048

Type enter to save it in the default location.
Choose a passphrase, or type enter to ignore it.
If you choose to enter a passphrase, be sure to remember it!

Copying your public key to the server

Your public key is now stored in a file (typically, in ~/.ssh/id_rsa.pub). You will need to copy-paste the content of this file into the website. Make sure you copy your entire key, including the ssh-rsa prefix and the key identifier at the end.

Windows

To generate SSH keys on Windows, you must have Git Bash installed on your computer. This program comes with the git installation on Windows. If you don't have this program, please install git first.

Once you have git installed, open the Git Bash program, normally found in the start menu, and type the following command:

ssh-keygen -t rsa

The command will then ask for a location, which you can leave as the default. It will then also ask for a passphrase, which you may leave empty. If you don't, make sure to remember your passphrase!

Copying your public key to the server

You should now have a file called id_rsa.pub at the location you chose. You will need to copy-paste the content of this file into the website. Make sure you copy your entire key, including the ssh-rsa prefix and the key identifier at the end.

Installing Git

Submitting code to the platform is done using git. If you are not familiar with git, do not worry, we will provide you with all the commands. First, please ensure that git is installed on your computer. On your command line, enter the following command:

git --version

The command should return the version of git that is installed on your machine. If the above command returns an error, please install git on your system by following the instructions on this page.