-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into lp-link-twtr
- Loading branch information
Showing
45 changed files
with
326 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASE_DIR=/autograder/autograder_samples/python/src | ||
|
||
# Update autograder files | ||
cd /autograder/autograder_samples | ||
git pull | ||
|
||
cp /autograder/submission/calculator.py $BASE_DIR/calculator.py | ||
|
||
pip install -r $BASE_DIR/requirements.txt | ||
|
||
cd $BASE_DIR | ||
|
||
python run_tests.py > /autograder/results/results.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd /autograder/source | ||
|
||
apt-get install -y python python-pip python-dev | ||
|
||
mkdir -p /root/.ssh | ||
cp ssh_config /root/.ssh/config | ||
# Make sure to include your private key here | ||
cp deploy_key /root/.ssh/deploy_key | ||
# To prevent host key verification errors at runtime | ||
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | ||
|
||
# Clone autograder files | ||
git clone git@github.com:gradescope/autograder_samples /autograder/autograder_samples | ||
# Install python dependencies | ||
pip install -r /autograder/autograder_samples/python/src/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Host github.com | ||
IdentityFile ~/.ssh/deploy_key | ||
IdentitiesOnly yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Pulling Autograder from Git | ||
|
||
To speed up autograder development, you can pull your autograder from a Git | ||
repository. This will allow you to avoid long setup times when testing changes | ||
to your autograder. You will still want to put common setup in your `setup.sh` or | ||
`Dockerfile`, to avoid having to install things on each autograder run. You may | ||
also want to include a copy of the repository in the base image, so that | ||
autograder runs don't have to clone it from scratch. | ||
|
||
If you just want to jump in, you can check out our | ||
[example](https://github.com/gradescope/autograder_samples/tree/master/deploy_keys). | ||
When using this, make sure to generate a keypair, and include your private key | ||
file in your autograder zip file or Docker image. | ||
|
||
## Setting up your SSH configuration | ||
|
||
You should set up your ssh config so that Git knows to use the correct private | ||
key when pulling. Your configuration should look something like the following: | ||
|
||
``` | ||
Host github.com | ||
IdentityFile ~/.ssh/deploy_key | ||
IdentitiesOnly yes | ||
``` | ||
|
||
Make sure to include the private key in your autograder image, and copy it to | ||
the right place. | ||
|
||
You should also make sure to include the host keys for your git server, so that | ||
you don't get a host key verification error at runtime. You can do this by | ||
running something like | ||
|
||
``` | ||
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | ||
``` | ||
|
||
in your setup script. | ||
|
||
## Github Deploy Keys | ||
|
||
Github has a | ||
[deploy keys](https://developer.github.com/v3/guides/managing-deploy-keys/#deploy-keys) | ||
feature, which allows you to set up a read-only key without a passphrase for the purpose of pulling down your autograder. Follow their instructions on how to generate a new keypair, and add the public key to your Github repository. Then, you can configure SSH to use the private key when connecting to github.com as described above. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.wy-side-nav-search { | ||
background-color: #1ba2bb | ||
background-color: #1b827f; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.