Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

软件环境信息 #18

Open
XiangyunHuang opened this issue Oct 22, 2022 · 9 comments
Open

软件环境信息 #18

XiangyunHuang opened this issue Oct 22, 2022 · 9 comments

Comments

@XiangyunHuang
Copy link
Owner

XiangyunHuang commented Oct 22, 2022

其它外部软件信息


> extSoftVersion()
                       zlib                       bzlib 
                   "1.2.13"        "1.0.8, 13-Jul-2019" 
                         xz                        PCRE 
                    "5.4.1"          "10.42 2022-12-11" 
                        ICU                         TRE 
                     "72.1"           "TRE 0.8.0 (BSD)" 
                      iconv                    readline 
               "glibc 2.37"                       "8.2" 
                       BLAS 
"FlexiBLAS OPENBLAS-OPENMP" 
> La_library()
[1] "FlexiBLAS OPENBLAS-OPENMP"
> La_version()
[1] "3.11.0"
> capabilities()
       jpeg         png        tiff       tcltk         X11        aqua    http/ftp 
       TRUE        TRUE        TRUE        TRUE       FALSE       FALSE        TRUE 
    sockets      libxml        fifo      cledit       iconv         NLS       Rprof 
       TRUE       FALSE        TRUE        TRUE        TRUE        TRUE        TRUE 
    profmem       cairo         ICU long.double     libcurl 
       TRUE        TRUE        TRUE        TRUE        TRUE 
> l10n_info()
$MBCS
[1] TRUE

$`UTF-8`
[1] TRUE

$`Latin-1`
[1] FALSE

$codeset
[1] "UTF-8"
> libcurlVersion()
[1] "8.0.1"
attr(,"ssl_version")
[1] "OpenSSL/3.0.8"
attr(,"libssh_version")
[1] "libssh/0.10.4/openssl/zlib"
attr(,"protocols")
 [1] "dict"    "file"    "ftp"     "ftps"    "gopher"  "gophers" "http"   
 [8] "https"   "imap"    "imaps"   "ldap"    "ldaps"   "mqtt"    "pop3"   
[15] "pop3s"   "rtsp"    "scp"     "sftp"    "smb"     "smbs"    "smtp"   
[22] "smtps"   "telnet"  "tftp"
> grSoftVersion()
                   cairo                  cairoFT                    pango 
                "1.17.8"                       ""                "1.50.14" 
                  libpng                     jpeg                  libtiff 
                "1.6.37"                    "6.2" "LIBTIFF, Version 4.4.0" 
> pcre_config()
             UTF-8 Unicode properties                JIT              stack 
              TRUE               TRUE               TRUE              FALSE 
> 
@XiangyunHuang
Copy link
Owner Author

XiangyunHuang commented Feb 11, 2023

  • 在 MacOS 上,如果以 brew install r 方式安装 R 软件,则后续安装 R 包都是从源码安装,而且一旦安装,就不要轻易升级系统软件依赖,比如 gdal 3.6.3 arrow 11.0.0 发布新版本后,重新安装 sf terra arrow 包,之后不再轻易升级软件,否则无法使用这些 R 包。如果更新 gdal 和 proj 的上游依赖,如 libtiff ,则必须同时更新 gdal 和 proj 否则 sf terra 等包就不能安装和使用,依赖的连锁反应。 failed to load on MacOS (x86 and M2) r-spatial/sf#2217
  • tensorflow 目前还不支持 Python 3.11 Support Python 3.11 tensorflow/tensorflow#58032

@XiangyunHuang
Copy link
Owner Author

目前,书籍的依赖环境相对稳定。

  • rpandocquarto 的升级要慎重,会对本书整体产生影响。
  • ggplot2dplyr 大版本升级也会对书的多个章节产生重大影响。
  • 余下还有 sf rgl gt 等包,遇到重大升级,得新建分支。

@XiangyunHuang
Copy link
Owner Author

ganttrify 和 ggradar 依赖颇多,且使用风格与 ggplot2 很不一样,故暂移除。

甘特图 {#sec-gantt}

甘特图常用于项目、流程管理,描述节点之间的依赖关系,展示关键节点。 ganttrify 包专门用来绘制甘特图,如 @fig-gant 所示。

#| label: fig-gant
#| fig-cap: "项目和任务进展"
#| fig-width: 7
#| fig-height: 4.5
#| fig-showtext: true

library(ganttrify)
ganttrify(project = ganttrify::test_project,
          project_start_date = "2021-03",
          font_family = "sans")

雷达图 {#sec-radar}

ggradar 包绘制雷达图对比美国三个州的数据,根据人口密度,从 state.x77 选择康涅狄格州 Connecticut, 马塞诸塞州 Massachusetts, 新泽西州 New Jersey,比较它们的人均收入 Income,文盲率 Illiteracy, 预期寿命 Life Exp,谋杀率 Murder 和高中毕业率 HS Grad。 函数 ggradar() 要求数据集各个比较的变量归一化到 0-1 区间。

#| label: fig-state-x77-comp
#| fig-cap: "康涅狄格州、马塞诸塞州、新泽西州的比较"
#| fig-width: 7.5
#| fig-height: 4
#| fig-showtext: true
#| warning: false

state_x77 <- data.frame(state.x77,
  state_name = rownames(state.x77),
  state_region = state.region,
  check.names = FALSE
)
state_x77_sub <- state_x77[
  c("Connecticut", "Massachusetts", "New Jersey"),
  c("Income", "Illiteracy", "Life Exp", "Murder", "HS Grad")
]
state_x77_scale <- apply(state_x77_sub, 2, scales::rescale)
state_x77_comp <- data.frame(state = rownames(state_x77_scale), state_x77_scale)

library(ggradar)
ggradar(plot.data = state_x77_comp, base.size = 13, legend.position = "right")

@XiangyunHuang
Copy link
Owner Author

XiangyunHuang commented Apr 25, 2023

  • gifski 必须从源码安装, fedora 仓库不提供编译版本。
  • showtext 必须从源码编译,才能使用系统字体。
  • 安装 V8 包需要设置环境变量 export DOWNLOAD_STATIC_LIBV8=1
  • 导出高质量的 mermaid 制作的图片,需要安装 chromium
    https://quarto.org/docs/authoring/diagrams.html

@XiangyunHuang
Copy link
Owner Author

XiangyunHuang commented May 7, 2023

sf

sf::sf_extSoftVersion()
          GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H 
      "3.11.2"        "3.6.4"        "9.2.0"         "true"         "true" 
          PROJ 
       "9.2.0" 

@XiangyunHuang
Copy link
Owner Author

Binder 环境

启动 Binder 环境后,进入 RStudio IDE,在 Terminal 窗口中查看 CPU 信息

lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  72
  On-line CPU(s) list:   0-71
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
    CPU family:          6
    Model:               85
    Thread(s) per core:  2
    Core(s) per socket:  18
    Socket(s):           2
    Stepping:            4
    CPU max MHz:         2300.0000
    CPU min MHz:         1000.0000
    BogoMIPS:            4600.00
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca c
                         mov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm 
                         pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_per
                         fmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid ap
                         erfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est t
                         m2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2
                         apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rd
                         rand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_
                         l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp 
                         tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_
                         adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rd
                         t_a avx512f avx512dq rdseed adx smap clflushopt clwb intel
                         _pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsa
                         ves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dthe
                         rm arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku
                          ospke md_clear flush_l1d arch_capabilities
Virtualization features: 
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   1.1 MiB (36 instances)
  L1i:                   1.1 MiB (36 instances)
  L2:                    36 MiB (36 instances)
  L3:                    49.5 MiB (2 instances)
NUMA:                    
  NUMA node(s):          2
  NUMA node0 CPU(s):     0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,
                         42,44,46,48,50,52,54,56,58,60,62,64,66,68,70
  NUMA node1 CPU(s):     1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,
                         43,45,47,49,51,53,55,57,59,61,63,65,67,69,71
Vulnerabilities:         
  Itlb multihit:         KVM: Mitigation: VMX disabled
  L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushes, 
                         SMT vulnerable
  Mds:                   Mitigation; Clear CPU buffers; SMT vulnerable
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Mitigation; Clear CPU buffers; SMT vulnerable
  Retbleed:              Mitigation; IBRS
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl an
                         d seccomp
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sa
                         nitization
  Spectre v2:            Mitigation; IBRS, IBPB conditional, RSB filling, PBRSB-eIB
                         RS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Mitigation; Clear CPU buffers; SMT vulnerable

top 命令查看可用的资源信息,如下

top

@XiangyunHuang
Copy link
Owner Author

Binder 免费提供的 RStudio 环境

binder
rstudio

@XiangyunHuang

This comment was marked as outdated.

@XiangyunHuang

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant