利用角色roles上线wordpress项目

news2025/2/22 11:22:01

角色订制:roles

① 简介

对于以上所有的方式有个弊端就是无法实现复用假设在同时部署Web、db、ha 时或不同服务器组合不同的应用就需要写多个yml文件。很难实现灵活的调用。   roles 用于层次性、结构化地组织playbook。roles 能够根据层次型结构自动装载变量文件、tasks以及handlers等。要使用roles只需要在playbook中使用include指令即可。简单来讲,roles就是通过分别将变量(vars)、文件(file)、任务(tasks)、模块(modules)及处理器(handlers)放置于单独的目录中,并可以便捷地include它们的一种机制。角色一般用于基于主机构建服务的场景中,但也可以是用于构建守护进程等场景中。

② 角色集合

角色集合:roles/ mysql/ httpd/ nginx/ files/:存储由copy或script等模块调用的文件; tasks/:此目录中至少应该有一个名为main.yml的文件,用于定义各task;其它的文件需要由main.yml进行“包含”调用; handlers/:此目录中至少应该有一个名为main.yml的文件,用于定义各handler;其它的文件需要由main.yml进行“包含”调用; vars/:此目录中至少应该有一个名为main.yml的文件,用于定义各variable;其它的文件需要由main.yml进行“包含”调用; templates/:存储由template模块调用的模板文本; meta/:此目录中至少应该有一个名为main.yml的文件,定义当前角色的特殊设定及其依赖关系;其它的文件需要由main.yml进行“包含”调用; default/:此目录中至少应该有一个名为main.yml的文件,用于设定默认变量;

实验:

192.168.231.210 安装ansible机器 管理机

192.168.231.214 

192.168.231.215 被管理的俩台机器

在roles目录下生成对应的目录结构

[root@localhost ~]# mkdir roles
[root@localhost ~]# cd  roles

[root@localhost roles]# ansible-galaxy init nginx 
- Role nginx was created successfully
[root@localhost roles]# ansible-galaxy init mysql
- Role mysql was created successfully
[root@localhost roles]# ansible-galaxy init php
- Role php was created successfully

[root@localhost roles]# tree
.
├── mysql
│   ├── defaults
│   │   └── main.yml
│   ├── files
│   ├── handlers
│   │   └── main.yml
│   ├── meta
│   │   └── main.yml
│   ├── README.md
│   ├── tasks
│   │   └── main.yml
│   ├── templates
│   ├── tests
│   │   ├── inventory
│   │   └── test.yml
│   └── vars
│       └── main.yml
├── nginx
│   ├── defaults
│   │   └── main.yml
│   ├── files
│   ├── handlers
│   │   └── main.yml
│   ├── meta
│   │   └── main.yml
│   ├── README.md
│   ├── tasks
│   │   └── main.yml
│   ├── templates
│   ├── tests
│   │   ├── inventory
│   │   └── test.yml
│   └── vars
│       └── main.yml
└── php
    ├── defaults
    │   └── main.yml
    ├── files
    ├── handlers
    │   └── main.yml
    ├── meta
    │   └── main.yml
    ├── README.md
    ├── tasks
    │   └── main.yml
    ├── templates
    ├── tests
    │   ├── inventory
    │   └── test.yml
    └── vars
        └── main.yml

27 directories, 24 files

分别定义配置文件 ,nginx配置文件

[root@localhost roles]# vim nginx/tasks/main.yml 
---
# tasks file for nginx
    - name: 下载yum源
      shell: curl -o /opt/yum-server.sh http://10.36.192.100/yum-server.sh
    
    - name: 安装yum源
      shell: sh /opt/yum-server.sh

    - name: 安装nginx
      yum: name=nginx state=present

    - name: nginx配置文件
      template: src=/root/nginx.conf dest=/etc/nginx/
    - name: 拷贝php
      copy: src=/root/roles/wp-config.php  dest=/usr/share/nginx/html/wordpress

    - name: 启动Nginx
      service: name=nginx state=started enabled=true
    
    - name: 拷贝wordpress源代码
      unarchive: src=/root/wordpress-6.4.1-zh_CN.tar.gz dest=/usr/share/nginx/html
  • 创建 /root/roles/wp-config.php文件写入一下内容

[root@localhost roles]# vim  wp-config.php 
<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the installation.
 * You don't have to use the web site, you can copy this file to "wp-config.php"
 * and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * Database settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://wordpress.org/documentation/article/editing-wp-config-php/
 *
 * @package WordPress
 */

// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );

/** Database username */
define( 'DB_USER', 'wordpress' );

/** Database password */
define( 'DB_PASSWORD', 'Qianfeng@123' );

/** Database hostname */
define( 'DB_HOST', '192.168.231.214' );

/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8mb4' );

/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**#@+
 * Authentication unique keys and salts.
 *
 * Change these to different unique phrases! You can generate these using
 * the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
 *
 * You can change these at any point in time to invalidate all existing cookies.
 * This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define( 'AUTH_KEY',         'U^UE ~}t)n(9.~=_qMaI:,K`X;Iji<Bsuh[b%yL-VpltA#_zRAX<~kJ>`D;PB:g4' );
define( 'SECURE_AUTH_KEY',  'mZcTrBj{U/-M#+AX:U +&?.&sXlV~/Dlm:rO|=/XL66gI+pl#IcwWUe(<p6HzYs1' );
define( 'LOGGED_IN_KEY',    'D(a}-NENZ{u[& =;|fSIDZt]`z aVKYyt|wt$5[jC#<yvgaM9mvvZCn|W(Wo=8rY' );
define( 'NONCE_KEY',        'MRC+QQ+o6`uE?S^`&#7A1cwBP1I2jC#S?%xoR9dQSSs1+S}n.F{Cf7l*%c:dUSbo' );
define( 'AUTH_SALT',        'Ai6`CEc,KaGUmk-/mLFEU $:b0#!Mjg6_qTB)+*tx=SRsuD6+;z[Ji6gL|@8.TRn' );
define( 'SECURE_AUTH_SALT', '`NL:<P=!HtaQ> q]*}_TB9LA!%Kmh7CjXeM-s-/;>U0o8huC7&KPq{i_wNX%3OI{' );
define( 'LOGGED_IN_SALT',   'q9p;a=$q|m}NI*z!?UKgMzs*xKsF)L.TPhnZ/|U[5bw+RzDv.|$W#vMzu<g5!xYb' );
define( 'NONCE_SALT',       'F+/f&;FTu yZ^(qtdT3 zY%s~FN6lS71iic:X1&q4f^pzi4w3e/$b %,tRt?),$4' );

/**#@-*/

/**
 * WordPress database table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the documentation.
 *
 * @link https://wordpress.org/documentation/article/debugging-in-wordpress/
 */
define( 'WP_DEBUG', false );

/* Add any custom values between this line and the "stop editing" line. */



/* That's all, stop editing! Happy publishing. */

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
	define( 'ABSPATH', __DIR__ . '/' );
}

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';

修改变量文件

[root@localhost roles]# vim    nginx/vars/main.yml 
---
# vars file for nginx
  nginx_user: root
  nginx_port: 80

放置我们所需要的文件到指定目录

直接 cp /root/nginx.conf  /root/roles/nginx/templates/nginx.conf
也可以直接写
[root@localhost roles]# vim nginx/templates/nginx.conf 
# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user {{ nginx_user }};
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 4096;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       {{ nginx_port }};
        listen       [::]:80;
        server_name  _;
        root         /usr/share/nginx/html/wordpress;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;
        location / {
	    root /usr/share/nginx/html/wordpress;
	    index index.php;
	}
        location ~ \.php$ {
            root          /usr/share/nginx/html/wordpress;  #指定网站目录
            fastcgi_pass   127.0.0.1:9000;    #指定访问地址
            fastcgi_index  index.php;		#指定默认文件
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;  #包含nginx常量定义
        		
        }  

        error_page 404 /404.html;
        location = /404.html {
        }

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        }
    }

# Settings for a TLS enabled server.
#
#    server {
#        listen       443 ssl http2;
#        listen       [::]:443 ssl http2;
#        server_name  _;
#        root         /usr/share/nginx/html;
#
#        ssl_certificate "/etc/pki/nginx/server.crt";
#        ssl_certificate_key "/etc/pki/nginx/private/server.key";
#        ssl_session_cache shared:SSL:1m;
#        ssl_session_timeout  10m;
#        ssl_ciphers HIGH:!aNULL:!MD5;
#        ssl_prefer_server_ciphers on;
#
#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;
#
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
#
#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }

}

php配置文件

[root@localhost roles]# vim php/tasks/main.yml 
---
# tasks file for php
  - name: 安装PHP
    yum: name=php80-php-xsl,php80-php,php80-php-cli,php80-php-devel,php80-php-gd,php80-php-pdo,php80-php-mysql,php80-php-fpm state=present

  - name: 启动PHP
    service: name=php80-php-fpm state=started enabled=true

mysql配置文件

[root@localhost roles]# cat mysql/tasks/main.yml 
---
# tasks file for mysql
 - name: 安装数据库
   yum: name=mariadb-server,mariadb state=present disablerepo=mysql-5.7-community

 - name: 启动数据库
   service: name=mariadb state=started enabled=true
    
 - name: 配置数据库
   shell: mysql -e "create database {{ db_name }}; grant all on wordpress.* to 'wordpress'@'%' identified by '{{ db_passwd }}'; flush privileges" 

mysql变量文件

[root@localhost roles]# vim mysql/vars/main.yml 
---
# vars file for mysql
db_passwd: 'Qianfeng@123'
db_name: 'wordpress'

定义剧本文件

接下来,我们就来定义剧本文件,由于大部分设置我们都单独配置在了roles里面,所以,接下来剧本就只需要写一点点内容即可:

[root@localhost roles]# vim roles.yml 
---

- hosts: web
  remote_user: root
  roles:
     - nginx
     - php
     - mysql

启动服务

[root@localhost roles]# ansible-playbook roles.yml

PLAY [web] ********************************************************************************

TASK [Gathering Facts] ********************************************************************
ok: [web1]
ok: [web2]

TASK [nginx : 下载yum源] *********************************************************************
[WARNING]: Consider using the get_url or uri module rather than running 'curl'.  If you
need to use command because get_url or uri is insufficient you can add 'warn: false' to
this command task or set 'command_warnings=False' in ansible.cfg to get rid of this
message.
changed: [web1]
changed: [web2]

TASK [nginx : 安装yum源] *********************************************************************
changed: [web1]
changed: [web2]

TASK [安装nginx] ****************************************************************************
changed: [web1]
changed: [web2]

TASK [nginx配置文件] **************************************************************************
changed: [web1]
changed: [web2]

TASK [nginx : 启动Nginx] ********************************************************************
changed: [web2]
changed: [web1]

TASK [nginx : 拷贝wordpress源代码] *************************************************************
changed: [web2]
changed: [web1]

TASK [php : 安装PHP] ************************************************************************
changed: [web1]
changed: [web2]

TASK [php : 启动PHP] ************************************************************************
changed: [web1]
changed: [web2]

TASK [mysql : 安装数据库] **********************************************************************
changed: [web1]
changed: [web2]

TASK [mysql : 启动数据库] **********************************************************************
changed: [web1]
changed: [web2]

TASK [mysql : 配置数据库] **********************************************************************
changed: [web1]
changed: [web2]

PLAY RECAP ********************************************************************************
web1                       : ok=12   changed=11   unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
web2                       : ok=12   changed=11   unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

查看所有服务的端口

[root@localhost roles]# ansible web -m shell -a 'ss -nplt'
web1 | CHANGED | rc=0 >>
State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN     0      128    127.0.0.1:9000                     *:*                   users:(("php-fpm",pid=2504,fd=9),("php-fpm",pid=2503,fd=9),("php-fpm",pid=2502,fd=9),("php-fpm",pid=2501,fd=9),("php-fpm",pid=2500,fd=9),("php-fpm",pid=2499,fd=7))
LISTEN     0      50           *:3306                     *:*                   users:(("mysqld",pid=2986,fd=14))
LISTEN     0      128          *:80                       *:*                   users:(("nginx",pid=2057,fd=6),("nginx",pid=2056,fd=6),("nginx",pid=2055,fd=6))
LISTEN     0      128          *:22                       *:*                   users:(("sshd",pid=922,fd=3))
LISTEN     0      100    127.0.0.1:25                       *:*                   users:(("master",pid=1115,fd=13))
LISTEN     0      128       [::]:80                    [::]:*                   users:(("nginx",pid=2057,fd=7),("nginx",pid=2056,fd=7),("nginx",pid=2055,fd=7))
LISTEN     0      128       [::]:22                    [::]:*                   users:(("sshd",pid=922,fd=4))
LISTEN     0      100      [::1]:25                    [::]:*                   users:(("master",pid=1115,fd=14))
web2 | CHANGED | rc=0 >>
State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN     0      128    127.0.0.1:9000                     *:*                   users:(("php-fpm",pid=2499,fd=9),("php-fpm",pid=2498,fd=9),("php-fpm",pid=2497,fd=9),("php-fpm",pid=2496,fd=9),("php-fpm",pid=2495,fd=9),("php-fpm",pid=2494,fd=7))
LISTEN     0      50           *:3306                     *:*                   users:(("mysqld",pid=2983,fd=14))
LISTEN     0      128          *:80                       *:*                   users:(("nginx",pid=2052,fd=6),("nginx",pid=2051,fd=6),("nginx",pid=2050,fd=6))
LISTEN     0      128          *:22                       *:*                   users:(("sshd",pid=920,fd=3))
LISTEN     0      100    127.0.0.1:25                       *:*                   users:(("master",pid=1115,fd=13))
LISTEN     0      128       [::]:80                    [::]:*                   users:(("nginx",pid=2052,fd=7),("nginx",pid=2051,fd=7),("nginx",pid=2050,fd=7))
LISTEN     0      128       [::]:22                    [::]:*                   users:(("sshd",pid=920,fd=4))
LISTEN     0      100      [::1]:25                    [::]:*                   users:(("master",pid=1115,fd=14))

进去浏览器查看

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1204143.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

linux下使用Docker Compose部署Spug实现公网远程访问

&#x1f4d1;前言 本文主要是linux下使用Docker Compose部署Spug实现公网远程访问的文章&#xff0c;如果有什么需要改进的地方还请大佬指出⛺️ &#x1f3ac;作者简介&#xff1a;大家好&#xff0c;我是青衿&#x1f947; ☁️博客首页&#xff1a;CSDN主页放风讲故事 &am…

openlayers 注册投影

注册投影 openlayers 默认支持的坐标系有4326&#xff08;基于美国wgs84坐标系&#xff09;和3857&#xff08;墨卡托投影&#xff09;两种。 所以如果我们想要使用比如4490坐标系&#xff0c;或者4547坐标系&#xff0c;就需要先注册&#xff0c; 注册4490示例代码如下 如…

【Linux进程】进程控制

目录 一、进程创建 1.2 fork函数初识 1.2 fork函数返回值 1.3 写时拷贝 1.4 fork常规用法 1.5 fork调用失败的原因 二、进程终止 2.1 进程退出场景 2.2 进程退出码 2.2.1 用strerror打印错误信息 2.2.2 errno全局变量 2.3 进程常见退出方法 2.3.1 进程正常退出 2…

力扣刷题-二叉树-对称二叉树

101 对称二叉树 给你一个二叉树的根节点 root &#xff0c; 检查它是否轴对称。 示例 1&#xff1a; 输入&#xff1a;root [1,2,2,3,4,4,3] 输出&#xff1a;true 示例 2&#xff1a; 输入&#xff1a;root [1,2,2,null,3,null,3] 输出&#xff1a;false 思路 我的思路…

RK3568笔记五:基于Yolov5的训练及部署

若该文为原创文章&#xff0c;转载请注明原文出处。 一. 部署概述 环境&#xff1a;Ubuntu20.04、python3.8 芯片&#xff1a;RK3568 芯片系统&#xff1a;buildroot 开发板&#xff1a;ATK-DLRK3568 开发主要参考文档&#xff1a;《Rockchip_Quick_Start_RKNN_Toolkit2_C…

2023测试工程师必看系列:用JMeter+ANT进行接口自动化测试,并生成HTML测试报告

【文章末尾给大家留下了大量的福利】 小伙伴们&#xff0c;用python做接口自动化是不是写代码比较繁琐&#xff0c;而且没有python代码基础的小伙伴根本无从下手对吧&#xff01;今天我们来学习一下如何使用JMeter工具实现接口自动化测试。 01 安装 1、安装JDK&#xff0c;…

weblogic集群配置信息,IIOP问题解决,节点配置管理

第一、创建域的时候&#xff0c;管理服务器&#xff0c;受管服务器&#xff0c;选择管理服务器&#xff0c;设置端口9001&#xff0c;其他默认下一步即可。 第二、启动管理服务器&#xff0c;打开控制台&#xff0c;增加服务器&#xff0c;集群如图&#xff0c;如果这两部有问…

【NLP】理解 Llama2:KV 缓存、分组查询注意力、旋转嵌入等

LLaMA 2.0是 Meta AI 的开创性作品&#xff0c;作为首批高性能开源预训练语言模型之一闯入了 AI 场景。值得注意的是&#xff0c;LLaMA-13B 的性能优于巨大的 GPT-3(175B)&#xff0c;尽管其尺寸只是其一小部分。您无疑听说过 LLaMA 令人印象深刻的性能&#xff0c;但您是否想知…

计算机基础知识50

数据的增删改查(insert update delete select) # 用户列表的展示&#xff1a; # 把数据表中得用户数据都给查询出来展示在页面上 1. 查询 from app01 import models models.UserInfo.objects.all() # 查询所有的字段信息和数据 resmodels.UserInfo.objects.first() # 查询…

SM8081是一个高效率的1.5MHz同步步进降压DC/DC调节器,可提供高达1A的电压输出电流。

SM8081 高效率&#xff0c;1.5MHZ&#xff0c;1A 同步降压调节器 概述&#xff1a; SM8081是一个高效率的1.5MHz同步步进降压DC/DC调节器&#xff0c;可提供高达1A的电压输出电流。它可以在宽输入电压下工作范围从2.5V到5.5V&#xff0c;集成主开关以及具有非常低Rps&#x…

【OpenCV实现图像:用OpenCV图像处理技巧之巧用直方图】

文章目录 概要前置条件统计数据分析直方图均衡化原理小结 概要 图像处理是计算机视觉领域中的重要组成部分&#xff0c;而直方图在图像处理中扮演着关键的角色。如何巧妙地运用OpenCV库中的图像处理技巧&#xff0c;特别是直方图相关的方法&#xff0c;来提高图像质量、改善细…

threejs (三) 几何体

定义&#xff1a;用来表示物体的形状&#xff0c;可以定义物体的大小&#xff0c;可以被缩放、旋转和平移 内置几何体&#xff1a; 二维几何体&#xff1a;PlaneGeometry矩形平面、CircleGeometry圆形平面、RingGeometry环形平面、ShapeGeometry二维图形三维几何体&#xff1a…

UI和UX设计师实用高效的设计工具大全

真正专业和优秀的UX设计师不会介意使用哪个工具。因为&#xff0c;只要能力足够&#xff0c;即使条件不同&#xff0c;工具不同&#xff0c;也可以设计出让人眼前一亮的作品。也许&#xff0c;这种理解本身并没有什么大问题。然而&#xff0c;如今&#xff0c;设计师显然有如此…

【汇编语言基础入门】—— 汇编的基础介绍

文章目录 一、机器语言二、汇编语言三、CPU 与 CPU 内存1、CPU 对存储器的读写 四、CPU 的典型构成1、寄存器2、通用寄存器3、物理地址的计算方法4、CS5、DS6、SS SP 一、机器语言 在学习汇编语言之前&#xff0c;我们应该先了解一下什么是机器语言。机器语言是机器指令的集合&…

网络渗透测试(被动扫描)

被动扫描 主要是指的是在目标无法察觉的情况下进行信息搜集。在Google上进行人名的搜素就是一次被动扫描。最经典的被动扫描技术就是"Google Hacking"技术。由于Google退出中国&#xff0c;暂时无法使用。在此介绍三个优秀的信息搜集工具 被动扫描范围 1.企业网络…

Kafka(三)生产者发送消息

文章目录 生产者发送思路自定义序列化类配置生产者参数提升吞吐量 发送消息关闭生产者结语示例源码仓库 生产者发送思路 如何确保消息格式正确的前提下最终一定能发送到Kafka? 这里的实现思路是 ack使用默认的all开启重试在一定时间内重试不成功&#xff0c;则入库&#xff…

基于Python实现,调用百度通用翻译API-详解

概述 在工作上需要各个国家语言的翻译方面很多地方用的上。 获取API权限: 登录百度账号,在个人信息界面,包括修改密码、绑定手机、身份人证等 https://api.fanyi.baidu.com/api/trans/product/desktop?req=developer 百度翻译开放平台 在开发者中心:需要开通个人账号…

13.利用辗转相除法求两个整数的最大公约数和最小公倍数。如96,36

文章目录 前言一、题目描述 二、题目分析 三、解题 前言 本系列为循环结构编程题&#xff0c;点滴成长&#xff0c;一起逆袭。 一、题目描述 利用辗转相除法求两个整数的最大公约数和最小公倍数,如96,36 二、题目分析 最小公倍数(输入的两个数之积)除(它们的最大公约数) 三…

【斗破年番】老婆们见面针锋相对,万蝎门勾结魂殿,大战一触即发

Hello,小伙伴们&#xff0c;我是小郑继续为大家深度解析国漫资讯。 深度爆料&#xff0c;斗破苍穹年番70集剧情内容。萧炎对小医仙的信任可谓是深不可测&#xff0c;然而美杜莎与小医仙之间的隔阂却始终存在。尽管美杜莎和紫妍都已加入毒宗&#xff0c;但两人之间的冲突从未停…

模型剪枝Lab

这里是MIT 6.5940 Fall 2023的第一个实验Lab1的一些笔记&#xff0c;课程传送门&#xff1a;Han Lab Setup First, install the required packages and download the datasets and pretrained model. Here we use CIFAR10 dataset and VGG network which is the same as what…