Docker updates and install fixes
This commit is contained in:
Родитель
b0319d742c
Коммит
9fe95ce8dc
|
@ -4,11 +4,16 @@
|
|||
# 2020-22 Jaroslaw Szczegielniak, Benjamin Kellenberger
|
||||
#
|
||||
|
||||
FROM pytorch/pytorch:1.7.1-cuda11.0-cudnn8-devel
|
||||
FROM pytorch/pytorch:1.9.0-cuda11.1-cudnn8-devel
|
||||
|
||||
# Avoid warnings by switching to noninteractive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# temporary fix for NVIDIA rotating public keys at the moment:
|
||||
# https://forums.developer.nvidia.com/t/invalid-public-key-for-cuda-apt-repository/212901/6
|
||||
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
|
||||
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||
|
||||
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
|
||||
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
|
||||
# will be updated to match your local UID/GID (when using the dockerFile property).
|
||||
|
|
|
@ -16,15 +16,14 @@ dbName=$(python util/configDef.py --section=Database --parameter=name)
|
|||
dbUser=$(python util/configDef.py --section=Database --parameter=user)
|
||||
dbPassword=$(python util/configDef.py --section=Database --parameter=password)
|
||||
dbPort=$(python util/configDef.py --section=Database --parameter=port)
|
||||
pgVersion=10
|
||||
sudo sed -i "s/\s*port\s*=\s[0-9]*/port = $pgVersion/g" /etc/postgresql/$version/main/postgresql.conf
|
||||
sudo sed -i "s/\s*port\s*=\s[0-9]*/port = $dbPort/g" /etc/postgresql/$pgVersion/main/postgresql.conf
|
||||
sudo service postgresql restart
|
||||
|
||||
sudo -u postgres psql -tc "SELECT 1 FROM pg_roles WHERE pg_roles.rolname='$dbUser'" | grep -q 1 || sudo -u postgres psql -c "CREATE USER \"$dbUser\" WITH PASSWORD '$dbPassword';"
|
||||
sudo -u postgres psql -tc "SELECT 1 FROM pg_database WHERE datname = '$dbName'" | grep -q 1 || sudo -u postgres psql -c "CREATE DATABASE \"$dbName\" WITH OWNER \"$dbUser\" CONNECTION LIMIT -1;"
|
||||
sudo -u postgres psql -c "GRANT CREATE, CONNECT ON DATABASE \"$dbName\" TO \"$dbUser\";"
|
||||
sudo -u postgres psql -d $dbName -c "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";"
|
||||
sudo -u postgres psql -d $dbName -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO \"$dbUser\";"
|
||||
sudo -u postgres psql -p $dbPort -tc "SELECT 1 FROM pg_roles WHERE pg_roles.rolname='$dbUser'" | grep -q 1 || sudo -u postgres psql -p $dbPort -c "CREATE USER \"$dbUser\" WITH PASSWORD '$dbPassword';"
|
||||
sudo -u postgres psql -p $dbPort -tc "SELECT 1 FROM pg_database WHERE datname = '$dbName'" | grep -q 1 || sudo -u postgres psql -p $dbPort -c "CREATE DATABASE \"$dbName\" WITH OWNER \"$dbUser\" CONNECTION LIMIT -1;"
|
||||
sudo -u postgres psql -p $dbPort -c "GRANT CREATE, CONNECT ON DATABASE \"$dbName\" TO \"$dbUser\";"
|
||||
sudo -u postgres psql -p $dbPort -d $dbName -c "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";"
|
||||
sudo -u postgres psql -p $dbPort -d $dbName -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO \"$dbUser\";"
|
||||
|
||||
# Create DB schema
|
||||
python setup/setupDB.py
|
||||
|
|
|
@ -14,9 +14,9 @@ celery[redis,auth,msgpack] #==4.4.7
|
|||
# for the AI backend
|
||||
opencv-python
|
||||
--find-links https://download.pytorch.org/whl/torch_stable.html
|
||||
torch>=1.6.0
|
||||
torchvision>=0.7.0
|
||||
torch==1.9.0+cu111
|
||||
torchvision==0.10.0+cu111
|
||||
|
||||
# Detectron2
|
||||
--find-links https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.8/index.html
|
||||
--find-links https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.9/index.html
|
||||
detectron2
|
Загрузка…
Ссылка в новой задаче