Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Latest commit

 

History

History
156 lines (101 loc) · 6.91 KB

README.md

File metadata and controls

156 lines (101 loc) · 6.91 KB

Scripts

This is a set of boilerplate scripts describing the normalized script pattern that GitHub uses in its projects. The GitHub Scripts To Rule Them All was used as a template. They were tested using Ubuntu 18.04.3 LTS on Windows 10.

LADI_DIR_TUTORIAL and Execution

These scripts assume that LADI_DIR_TUTORIAL has been set. Refer to the repository root README for instructions.

Dependencies

Linux Shell

The scripts need to be run in a Linux shell. For Windows 10 users, you can use Ubuntu on Windows. Specifically for Windows users, system drive and other connected drives are exposed in the /mnt/ directory. For example, you can access the Windows C: drive via cd /mnt/c.

If you modify these scripts, please follow the convention guide that specifies an end of line character of LF (\n). If the end of line character is changed to CRLF (\r), you will get an error like this:

Proxy and Internet Access

The scripts will download data using curl and wget, which depending on your security policy may require a proxy.

The scripts assume that the http_proxy and https_proxy linux environments variables have been set.

export http_proxy=proxy.mycompany:port
export https_proxy=proxy.mycompany:port

You may also need to configure git to use a proxy. This information is stored in .gitconfig, for example:

[http]
	proxy = http://proxy.mycompany:port
[https]
	proxy = http://proxy.mycompany:port

Superuser Access

Depending on your security policy, you may need to run some scripts as a superuser or another user. These scripts have been tested using sudo. Depending on how you set up the system variable, LADI_DIR_TUTORIAL you may need to call sudo with the -E flag, preserve env.

If running without administrator or sudo access, try running these scripts using bash, such as

bash ./setup.sh

The Scripts

Each of these scripts is responsible for a unit of work. This way they can be called from other scripts.

This not only cleans up a lot of duplicated effort, it means contributors can do the things they need to do, without having an extensive fundamental knowledge of how the project works. Lowering friction like this is key to faster and happier contributions.

The following is a list of scripts and their primary responsibilities.

script/bootstrap

script/bootstrap is used solely for fulfilling dependencies of the project, such as packages, software versions, and git submodules. The goal is to make sure all required dependencies are installed. This script should be run before script/setup.

Packages

Using apt, the following linux packages are installed:

Package Use
unzip extracting zip archives

The LADI team has not knowingly modified any of these packages. Any modifications to these packages shall be in compliance with their respective license and outside the scope of this repository.

script/setup

script/setup is used to set up a project in an initial state. This is typically run after an initial clone, or, to reset the project back to its initial state. This is also useful for ensuring that your bootstrapping actually works well.

Data

Commonly used datasets are downloaded by script/setup. Refer to the data directory README for more details.