sregistry部署
安装相关依赖
安装docker和docker compose
1 | https://docs.docker.com/engine/install/ubuntu/ |
安装docker compose
1 | sudo curl -L "https://github.com/docker/compose/releases/download/1.27.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose |
检验docker compose 是否已经安装成功
1 | docker-compose --version |
安装主机依赖
说明文档上给出的所需要的依赖环境
1 | anyjson |
查看pip是否已经安装成功
1 | pip --version |
利用pip进行相关python库的安装
真么查询都已经安装了哪些python库呢?
1 | pip list |
能够显示出pip所安装的所有python库
可以先进行容器的拉取和部署再根据报错信息进行相关依赖的补充安装
1 | docker-compose up |
可以安装Anaconda3 进行相关python库的管理和django的安装
下载所需的工程仓库
1 | git clone https://github.com/singularityhub/sregistry |
##
进行相关设置
Github 授权设置
1 |
|
容器的启动和删除
1 | docker-compose stop |
一些docker常用命令
docker 删除所有镜像
1 | docker rmi -f${docker images -qa} |
不能够利用singularity pull 来拉取镜像的原因
没有进行https的认证
遇到nginx不能启动常见的解决办法
查看80端口
1 | sudo lsof -i:80 |
1 | netstat -apn|grep 8080 |
直接查看与nginx相关的进程进行关闭
1 | ps -ef|grep nginx |
1 | kill -9 [pid] |
在阿里云服务器上部署服务的时候拉取镜像非常慢
尝试利用阿里云进行容器的加速
在/etc/docker/ 下重新建立一个 daemon.json 文件
1 | { |
进行docker容器的重启
1 | service docker restart |
1 | sudo systemctl daemon-reload |
但是感觉效果依然不是特别的明显
删除所有存在的镜像进行重新来过
超级用户和管理员的添加
与镜像进行交互
1 | 方法一: |
进行超级用户和管理员的删除操作
1 | $ python manage.py remove_superuser --username vsoch |
常用的新增新的team 和colletion的caozuo
1 | docker exec -it sregistry_uwsgi_1 bash |
sregistry项目的架构和页面更新
路由路径与设置
1 | url(r"^admin/", admin.site.urls), |
对应的是
base和main和user文件夹中的设置
1 | gridshub.cn |
shub/apps/base/templates/main/index.html
index 中对应着首页的四个宣传语句
Package your Analysis
需要改动
1 | <font color='red'> |
Visualize your containers
Request a Build
改动之处
1 | contact qq邮箱地址 |
Deploy an Analysis
改动
Deploy an Analysis 按钮
1 | ### shub/apps/base/templates/main/about.html |
在hexo 中随意插入html代码,容易造成
1 |
|
url:=”https://“+uri+”assets/config/config.prod.json”
1 |
|
export VERSION=1.13 OS=linux ARCH=amd64
wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz
sudo tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz
rm go$VERSION.$OS-$ARCH.tar.gz
1 |
|
$echo ‘export PATH=/usr/local/go/bin:$PATH’ >> ~/.bashrc &&\ source ~/.bashrc
1 |
|
sudo go env
1 |
|
./mconfig &&
make -C builddir &&
sudo make -C builddir install
1 | -C 选项的作用是指将当前工作目录转移到你所指定的位置。“M=”选项的作用是,当用户需要以某个内核为基础编译一个外部模块的话,需要在make modules 命令中加入“M=dir”,程序会自动到你所指定的dir目录中查找模块源码,将其编译,生成KO文件cd |
unable to find the libuuid,need package libuuid-devel(uuid-dev on debian/ubuntu)
1 |
|
sudo apt-get install uuid-dev
1 |
|
singularity version
1 |
|
sudo singularity pull Ubuntu
Singularity search Ubuntu
Singularity pull library://sylabsed/examples/lolcow
singularity build lolcow.sif docker://godlovedc/lolcow
进行lolcow的测试
$ singularity shell lolcow_latest.sif
Singularity lolcow_latest.sif:~> whoami
shub:// URIs 是从singularity hub 中拉取或者build from
默认的library 是 :The default library is “https://library.sylabs.io”
sudo singularity pull
1 |
|
Singularity remote list
singularity remote login
1 | 登录其他的远程节点 |
singularity remote login
1 |
|
singularity remote add
singularity remote add gridshub http://gridshub.cn
1 | 移除登录节点: |
singularity remote remove gridshub
1 |
|
singularity remote add gridshub http:gridshub.cn
singularity remote use gridshub
1 |
|
singularity remote login gridshub
将网页 gridshub.cn/token 页面的API token复制进去并认证
1 |
|
singularity push -U ubuntu——latest.sif library://jhshz520/my/another:latest
1 | <font color='orange'> |
singularity pull my/another:latest
```
因为已经登录进去了所以可以直接拉取某个Collection下的容器
数据持久化存在问题
在进行本地的运行和停止之后又被当做新用户进行重新的登录和注册
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 583614868@qq.com
文章标题:sregistry部署
文章字数:1.8k
本文作者:钟帅豪
发布时间:2020-09-16, 18:25:32
最后更新:2020-12-09, 11:19:41
原始链接:http://jhshz520.github.io/2020/09/16/sregistry部署/版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。