GitHub Codespaces使用及修改默认开发容器

快速方法 直接修改devcontainer.json文件中
“image”: “mcr.microsoft.com/devcontainers/python:1-3.8-bullseye”,
再rebulid

以Github CodeSpaces在线运行https://github.com/zepen/predict_Lottery_ticket为例

  1. 使用在线VSCode
    打开https://github.com/zepen/predict_Lottery_ticket项目代码页面。按句号键.中文/英文输入法均可
    代码页面
    打开VSCode终端,点击或按ctrl+j
    在线VSCode面板
    选择GitHub Codespaces
    选择GitHub Codespaces
    选择任意配置
    选择任意配置
    在面板 终端 查看python版本,默认开发容器python版本是3.10.13
    终端查看python版本命令
  2. 修改开发容器的默认python版本
    python版本3.10.13改为python3.8
    命令
    按Shift+Command+P或Ctrl+Shift+P
    输入add dev
    选择
    在这里插入图片描述
    选python 3
    python版本3.8
    搜索Coverage
    成功
    重新构建
    等待完成
    验证
    验证
  3. 管理GitHub Codespaces
    以后再次打开,进入https://github.com/codespaces/
    在这里插入图片描述
  4. 运行此项目
    在在线VSCode终端输入命令运行此项目
    pip install -r requirements.txt
    python get_data.py --name ssq
    python run_train_model.py --name ssq
    python run_predict.py --name ssq
    在这里插入图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值