当前位置: 首页 > news >正文

ubiquant比赛系列——用docker准备ubipoker开发环境

比赛过程:

环境准备:

#在云服务器上拉python官方的docker镜像并下载到本地
https://hub.docker.com/_/python/
sudo docker pull python:3.11.12-slim-bullseye
sudo docker images
sudo docker save -o 3.11.12-slim-bullseye.tar python:3.11.12-slim-bullseye
ls
ls -l /home/ubuntu/3.11.12-slim-bullseye.tar
sudo chown ubuntu:ubuntu /home/ubuntu/3.11.12-slim-bullseye.tar#在vmware中的ubuntu实例中加载python官方的docker镜像
docker load -i 3.11.12-slim-bullseye.tar
docker run -p 6789:6789 -it -v /home/chenfei/ubiquant/:/home/models python:3.11.12-slim-bullseye
docker start 8806c8c46e0f
docker ps
docker exec -it 8806c8c46e0f /bin/sh#因为ftp重新上传物料到ubiquant文件夹,原有的container需要删除重新启动
docker stop 8806c8c46e0f
docker rm 8806c8c46e0f
docker run -p 6789:6789 -it -v /home/chenfei/ubiquant/:/home/models python:3.11.12-slim-bullseye
docker start 4d252039b50a
docker ps
docker exec -it 4d252039b50a /bin/sh#通过映射文件地址传物料,给python:3.11.12-slim-bullseye镜像的容器配置环境
mv /etc/apt/sources.list /etc/apt/sources.list.bak
deb https://mirrors.tuna.tsinghua.edu.cn/debian bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
apt update
apt install -y vim#安装uWSGI依赖的C编译器
apt install -y build-essential python3-dev libpcre3-dev
apt install -y libssl-dev zlib1g-dev libffi-dev
python -m pip install --upgrade pip setuptools wheel -i https://mirrors.cloud.tencent.com/pypi/simple#安装依赖环境
python -m pip install -r requirements.txt -i https://mirrors.cloud.tencent.com/pypi/simple#将配置的docker容器备份为.tar文件
docker commit 4d252039b50a ubiquant_ubipoker:cf250424
docker images
docker save -o ubiquant_ubipoker_cf250424.tar ubiquant_ubipoker:cf250424

完成uWSGI编译:

最终pip list如下:

运行过程中发现还有缺失的可以继续添加:

#补充包
python -m pip install websocket-client -i https://mirrors.cloud.tencent.com/pypi/simple

相关文章:

  • 基于springboot的在线教育系统
  • EF Core 实体字段类型与 MySQL 数据库中常见字段类型的映射关系列表
  • 佳博票据和标签打印:Web网页端与打印机通信 | iOS
  • C++进阶----多态
  • Python笔记:VS2013编译Python-3.5.10
  • 【EDA】EDA中聚类(Clustering)和划分(Partitioning)的应用场景
  • 潮了 低配电脑6G显存生成60秒AI视频 本地部署/一键包/云算力部署/批量生成
  • 第3.2节 Android应用调用链路分析
  • 数字化技术的五个环节:大数据、云计算、人工智能、区块链、移动互联网
  • 深入理解指针(4)
  • 机器学习的基本概念
  • 面向智能家居安全的异常行为识别与应急联动关键技术研究与系统实现(源码+论文+部署讲解等)
  • 第二章 信息技术发展(2.1 信息技术及其发展)
  • 高频面试题:如何保证数据库和es数据一致性
  • 11.ArkUI Tabs的介绍和使用
  • 跟我学C++中级篇——处理对象的复制
  • 【科研绘图系列】R语言绘制区间点图(dot plot)
  • Vue前端学习笔记
  • 什么是测试驱动开发(TDD)?
  • Safety Estimands与Efficacy Estimands的差异剖析
  • 如何做大中国拳击产业的蛋糕?这项赛事给出办赛新思考
  • 人民日报任仲平:为什么中国意味着确定性、未来性、机遇性
  • 经济日报:美离间国际关系注定徒劳无功
  • 84%白化!全球珊瑚正经历最严重最大范围白化现象
  • 美媒称特朗普考虑大幅下调对华关税、降幅或超一半,外交部回应
  • “雷公”起诉人贩子王浩文案开庭:庭审前手写道歉信,庭审中不承认拐走川川