Skip to content

Commit

Permalink
Merge pull request #41 from ooemperor/dev
Browse files Browse the repository at this point in the history
Updating Flask Version, Install Scripts and installation doc
  • Loading branch information
ooemperor authored Feb 19, 2024
2 parents c27241b + ba96ea6 commit dfc5150
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion codeGrader/backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
flask >=2.3, <2.4
flask >=3.0.2, <3.1
requests >=2.31, <2.32
Flask-SQLAlchemy >=3, <3.1
psycopg2 >=2.9, <3.0
Expand Down
2 changes: 1 addition & 1 deletion codeGrader/frontend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
flask >=2.3, <2.4
flask >=3.0.2, <3.1
requests >=2.31, <2.32
setuptools >=68.0.0
gunicorn >=21.2.0, <21.3
Expand Down
22 changes: 17 additions & 5 deletions doc/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,31 @@ Following from here you can find all the needed steps for a full installation on

Install all apt packages including postgres:
```
apt-get install -y python-dev libpq-dev lxc libvirt0 libpam-cgfs bridge-utils uidmap pip
apt-get install -y libpq-dev lxc libvirt0 libpam-cgfs bridge-utils uidmap pip git
```
Verify the installation of the lxc with the lxc-ls command. It should return no output and no error.

```
apt update && sudo apt upgrade -y
apt update && apt upgrade -y
sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update
apt-get install postgresql-15
apt-get install postgresql-15 -y
```


```
sudo su - postgres
createuser --username=postgres --pwprompt codeGrader
createdb --username=postgres --owner=codeGrader codeGraderDB
psql --username=postgres --dbname=codeGraderDB --command='CREATE ROLE codeGrader'
psql --username=postgres --dbname=codeGraderDB --command='GRANT codegrader TO "codeGrader"'
psql --username=postgres --dbname=codeGraderDB --command='ALTER SCHEMA public OWNER TO codeGrader'
psql --username=postgres --dbname=codeGraderDB --command='GRANT SELECT ON pg_largeobject TO codeGrader'
exit
```
Then proceed with to clone and install the software itself:
Then proceed with to clone and install the software itself.

```
cd /opt
Expand All @@ -99,9 +104,16 @@ mv setup_full.py setup.py
pip install .
```

If you are running some Version of python higher than 3.9, it could be that there is an Error about Externally Managed python.
You can resolve this by running:
```
rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
```

Then create a new admin User and an api key with:
```
cgAddApiToken
cgDeployDB
cgAddApiToken -d <Description>
cgAddAdmin -u <username> -fn <first_name> -ln <last_name> -e <email> -p <password>
```
Expand Down

0 comments on commit dfc5150

Please sign in to comment.