タイトル : GPUマシンをUbuntuに gatsby
更新日 : 2024-05-05
カテゴリ : プログラミング
タグ :
ubuntu   
gatsby   

GPUマシンをUbuntuに

nodeを入れます

https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions にある

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt-get install -y nodejs

で入れました。nvmとかnは今回も見送り。nodeの複数バージョンを同時に使うことはないと思うので

Gatsbyの環境を構築しましょう

このサイトのページは現在はGatsbyで書いているので、まずはGastby構築しましょう。

とは言っても、先に使っていたマシンのフォルダをrsyncで持ってきてアップデートするだけ。

npm outdated の結果です。5.9を5.13.4に上げれば良いですね。

$ npm outdated
Package                        Current  Wanted  Latest  Location                                    Depended by
gatsby                           5.9.0  5.13.4  5.13.4  node_modules/gatsby                         Gatsby
gatsby-plugin-sharp              5.9.0  5.13.1  5.13.1  node_modules/gatsby-plugin-sharp            Gatsby
gatsby-remark-images             7.9.0  7.13.1  7.13.1  node_modules/gatsby-remark-images           Gatsby
gatsby-remark-prismjs            7.9.0  7.13.1  7.13.1  node_modules/gatsby-remark-prismjs          Gatsby
gatsby-remark-relative-images    2.0.2   2.0.5   2.0.5  node_modules/gatsby-remark-relative-images  Gatsby
gatsby-source-filesystem         5.9.0  5.13.1  5.13.1  node_modules/gatsby-source-filesystem       Gatsby
gatsby-transformer-remark        6.9.0  6.13.1  6.13.1  node_modules/gatsby-transformer-remark      Gatsby
react                           18.2.0  18.3.1  18.3.1  node_modules/react                          Gatsby
react-dom                       18.2.0  18.3.1  18.3.1  node_modules/react-dom                      Gatsby
$

package.jsonを書き換えて、アップデートしました。以下、アップデート後の各バージョンです。

$ npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk -v quote='"' 'BEGIN { FS = "@" } ; { print quote $1 quote,":",quote $2 quote"," }' | sed -e 's/ :/:/g'
"gatsby-awesome-pagination": "0.3.8",
"gatsby-plugin-sharp": "5.13.1",
"gatsby-remark-images": "7.13.1",
"gatsby-remark-prismjs-title": "1.0.0",
"gatsby-remark-prismjs": "7.13.1",
"gatsby-remark-relative-images": "2.0.5",
"gatsby-source-filesystem": "5.13.1",
"gatsby-transformer-remark": "6.13.1",
"gatsby": "5.13.4",
"prismjs": "1.29.0",
"react-dom": "18.3.1",
"react": "18.3.1",
$