Skip to content

Commit

Permalink
more natural naming and doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
albanD committed Aug 23, 2016
1 parent 8b6a834 commit 9cfb9d5
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 20 deletions.
50 changes: 35 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,52 @@
Self-contained Torch installation
============

Install dependencies. Uses `apt-get` on Ubuntu, which might require `sudo`. Uses `brew` on OSX.
```sh
curl -s https://raw.githubusercontent.com/torch/distro/master/install-deps | bash
#### Please refer to the [Torch installation guide](http://torch.ch/docs/getting-started.html#_) for details on how to make a fresh install of Torch.


## Repo content
#### Dependencies
Globally installed dependencies can be installed via:
```bash
bash intall-deps
```

Install this repo, which installs the torch distribution, with a lot of nice goodies.
```sh
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; ./install.sh
#### Lua and Torch
The self-contained Lua and Torch installations are performed via:
```bash
./install.sh
```

By default Torch will install LuaJIT 2.1. If you want other options, you can use the command:
```sh
```bash
# If a different version was installed, used ./clean.sh to clean it
TORCH_LUA_VERSION=LUA51 ./install.sh
TORCH_LUA_VERSION=LUA52 ./install.sh
```

Now, everything should be installed. Either open a new shell, or source your profile via
```sh
. ~/.bashrc # or: . ~/.zshrc
th -e "print 'I just installed Torch! Yesss.'"
## Update
To update your already installed distro to the latest `master` branch of `torch/distro` simply run:
```bash
./update.sh
```

## Cleaning
To remove all the temporary compilation files you can run:
```bash
./clean.sh
```

To remove the installation run:
```bash
# Warning: this will remove your current installation
rm -rf ./install
```
You may also want to remove the `torch-activate` entry from your shell start-up script (`~/.bashrc` or `~/.profile`).

Note: If you use a non-standard shell, you'll want to run this command
```sh
./install/bin/torch-activate
## Test
You can test that all libraries are installed properly by running:
```bash
./test.sh
```

Tested on Ubuntu 14.04, CentOS/RHEL 6.3 and OSX
5 changes: 5 additions & 0 deletions admin/updateSubmodules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
git pull
git submodule update
git submodule foreach git pull origin master
git add extra pkg exe
git commit -m "updating packages"
11 changes: 6 additions & 5 deletions update.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
git pull
git submodule update
git submodule foreach git pull origin master
git add extra pkg exe
git commit -m "updating packages"
#!/usr/bin/env bash

git fetch
git reset --hard origin/master
# Submodule update is done inside install.sh
./install.sh

0 comments on commit 9cfb9d5

Please sign in to comment.