#!/bin/bash

dnf install -y nfs-utils kernel-modules-extra

mkdir /mnt/data

mount -t nfs -o vers=3,proto=tcp 192.168.2.69:/mnt/user/ml_datasets0 /mnt/data


WORK_DIR=/mnt/data
mkdir -p /mnt/data/cache       # ensure directory exists
export OPENML_CACHE_DIR=/mnt/data/cache


apt install python3-venv

python3 -m venv <environment_name>

source <environment_name/bin/activate

pip install -r requirements.txt

chmod -R 750 /root/automl_datasets


adduser mlly
passwd mlly
# mlly
chown -R mlly:mlly /mnt/data
chmod -R 750 /mnt/data

su - mlly

sudo usermod -aG wheel mlly

sudo chmod -R u+rwx /mnt/data/automl_datasets/nsga/
