Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
banrieen committed Nov 24, 2021
1 parent 5535e93 commit dd9e76b
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions ops/init_env.sh
@@ -1,23 +1,23 @@
!/bin/bash
#=========================================================================================================================
# Info: 多租户任务容器编排
# Info: 导入到训练镜像并插入数据库
# Creator: thomas
# Update: 2021-07-31
# Tool version: 0.1.0
# Support Platform Version: MachineDevil v0.6.0
#=========================================================================================================================
1. 存储多租户
2. service 管理员
数据库应该是独立集群
3. 多租户pod
存储 + 数据库 + 控制台 + 【编排控制器 + etcd + virtual network】=>(security)job-pod[resource + network + service]

# init system
# install GPU driver and toolkit
# Install git

tmux, moning brew, timeshift,htop,MCDU,timetrap

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo zypper addrepo https://packages.microsoft.com/yumrepos/vscode vscode
sudo zypper refresh
sudo zypper install -y code

ventoy 多系统 启动盘
# Uninstall old versions
sudo zypper remove -y docker \
Expand All @@ -36,6 +36,8 @@ ventoy 多系统 启动盘
# VERSION_ID=$(cat /usr/lib/os-release | grep VERSION_ID | grep -Eo '[0-9]+\.[0-9]+')
# fi



# Install GPU Driver
zypper addrepo --refresh 'https://download.nvidia.com/opensuse/leap/$releasever' NVIDIA
# Get hardware information
Expand All @@ -47,6 +49,9 @@ sudo zypper se nvidia-glG0*
sudo zypper in x11-video-nvidiaG05
sudo zypper in nvidia-glG05

export PATH=/home/thomas/bin:/usr/local/bin:/usr/bin:/bin:/home/thomas/minio-binaries/:/home/thomas/minio-binaries/:/usr/local/cuda-11.4/bin
export LD_LIBRARY_PATH=:/usr/local/cuda-11.4/lib64
source ~/.bashrc

# Add the package repositories
# accept the overwrite of /etc/docker/daemon.json
Expand All @@ -63,15 +68,6 @@ distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& sudo zypper install nvidia-docker2 \
&& sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi

mkfs -t btrfs /dev/sda1

mount /dev/sda1 /mnt/storage

sudo mkdir -p /mnt/storage/discourse
sudo mkdir -p /mnt/storage/discourse/postgres
sudo mkdir -p /mnt/storage/discourse/redis
sudo mkdir -p /mnt/storage/discourse/discourse

# init k8s and argo and MAMO and kubeflow

# deploy discourse
Expand All @@ -81,23 +77,33 @@ sudo mkdir -p /mnt/storage/discourse/discourse

## config network
/etc/sysconfig/network/ifcfg-eth0
sudo echo """
BOOTPROTO='static'
IPADDR='192.168.2.77'
IPADDR='192.168.2.63'
MTU='1500'
NAME=''
NETMASK='255.255.255.0'
STARTMODE='auto'
USERCONTROL='no'

""" > /etc/sysconfig/network/ifcfg-enp2s0
/etc/sysconfig/network/routes
default 192.168.2.1 - -


# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
# NETCONFIG_DNS_STATIC_SEARCHLIST
# NETCONFIG_DNS_STATIC_SERVERS
# NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''

# Install cuda
wget https://developer.download.nvidia.com/compute/cuda/11.4.1/local_installers/cuda_11.4.1_470.57.02_linux.run
sudo sh cuda_11.4.1_470.57.02_linux.run

# Install OBS
sudo zypper ar -cfp 90 'https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_$releasever/' packman
sudo zypper dup --from packman --allow-vendor-chang
sudo zypper in obs-studio
sudo zypper in obs-studio

0 comments on commit dd9e76b

Please sign in to comment.