overleaf の docker on wsl 環境を作った

overleafを使ったこともないくせに、dockerたてた。

動機

texは思いついたらいきなり環境構築してたが、最近は混乱しててあんま手を出したくなかった。その中、overleafがいいというツイートをみかけたので、環境構築してみた。

参考サイト

triadsou.hatenablog.com qiita.com

環境

WIndows 10 Pro 21H2

前提

  • wslインストール
  • dockerインストール

構築

$ git clone https://github.com/overleaf/overleaf.git
$ cd overleaf
$ docker-compose up -d
$ docker ps
cba08460d191   sharelatex/sharelatex   "/sbin/my_init"          36 seconds ago   Up 24 seconds             0.0.0.0:80->80/tcp   sharelatex
2a6b3fb16ac2   mongo:4.0               "docker-entrypoint.s…"   38 seconds ago   Up 35 seconds (healthy)   27017/tcp            mongo
04a51207f141   redis:5                 "docker-entrypoint.s…"   38 seconds ago   Up 35 seconds             6379/tcp             redis$ docker exec -it 7cbf39b5f9f4 bash
$ docker exec -it cba08460d191 bash
root@7cbf39b5f9f4:/# tlmgr update --self
root@7cbf39b5f9f4:/# tlmgr install scheme-full
root@7cbf39b5f9f4:/# exit
$ sudo docker commit -m "installing all latex packages" cba08460d191 sharelatex/sharelatex:v1
$ docker-compose down

ここまでで、texインストールしたイメージを保存。docker-compose.ymlのイメージファイル名を保存したイメージに変更。最後に、adminユーザを作成。

$ docker exec sharelatex /bin/bash -c "cd /var/www/sharelatex; grunt user:create-admin --email=$email"

これで終わり。楽になったな。仮想環境便利すぎる。

  • 「tlmgr install scheme-full」が4k個くらいコンポーネントをインストールするのに結構時間がかかるので注意。
  • adminユーザ作成で標準出力されるパスワードリセットURLはメモっとこう。

余談

最近はZennとか使うのが楽なんだろうな。まぁでも、手元にいつでも再現可能な環境があるのはうれしいからな。

『10万円のクリームより効く「何もつけない」美肌ケア』をみた。

ひとこと紹介

皮膚科医が書いた本。美肌のためには何もつけないのがよいよと教えてくれる本。

購入動機

美肌に興味ある訳ではないが、タモリや宮迫がやってるときいて読んでみた。

所感

人間本来の肌機能を正常に活動するようにすると、肌がきれいになったよという話。その仕組みと実践例について書いてある。ざっくりまとめると以下のような感じ。

皮膚には以下のバリア機能がある
①角質細胞間脂質
②天然保湿因子

この機能があることで肌を美しく保つことができる
他の化粧品では代用できない

この機能を守るために以下が必要である
①肌が濡れたままの状態でいること
②界面活性剤に触れること
③体温より高いものに触れること
④肌をこすること

ただし、バリア機能に異常がある場合は、機能を損なわない程度に界面活性剤を使用してよい
その判断は、皮膚科医にしてもらうこと

読んでると、皮膚疾患になってない人は無理にやらんでもいいけど、肌はきれいになるよ的なスタンスのよう。

ひとつ、①が具体的にどのような弊害があるのか、気になる。①が問題だとすると、水泳やってると美肌によくないということになるから。水泳やっても美肌には影響ないよねとききたい。

最近コロナでほとんど風呂に入ってないので、ついでにやってみるかな。風呂めんどい。

計算論的神経科学 - 一次運動野の計算論モデル をみた。

講義

www.youtube.com www.youtube.com www.youtube.com

Motor Cortex Computes Reaching Dynamics in Cartesian Reference Frames

f:id:stheno2010:20210805021411p:plain

Unsolved debate: M1 for muscle or movements?

f:id:stheno2010:20210805021445p:plain

Spatial representation of reaching dynamics

f:id:stheno2010:20210805021502p:plain f:id:stheno2010:20210805021516p:plain f:id:stheno2010:20210805021527p:plain

Spatial representation hypothesis

f:id:stheno2010:20210805021543p:plain f:id:stheno2010:20210805021559p:plain

Model explains a variety of findings in M1 physiological and human psychophysical experiments

M1 properties

  1. Cosine tuning
  2. Position dependency of PDs
  3. Non-uniform distribution of PDs
  4. Coexisting multiple coorinate systems

Kinematics vs Dynamics

  1. Spatial properties of population vectors
  2. Temporal properties of population vectors
  3. Efficient computation of muscle tensions

Motor adaptation

  1. Neuronal activity change in constant load adaptation
  2. Neuronal activity change in viscous field adaptation
  3. Intrinsic-frame generalization in viscous field adaptation
  4. Extrinsic-frame generalization in visuomotor rotation adaptation

計算論的神経科学 - STDPの機能と計算論モデル をみた。

講義

www.youtube.com

STDP in equations

f:id:stheno2010:20210724015727p:plain

Functional consequence: reduced latency

f:id:stheno2010:20210724015829p:plain

Functional consequence: latent pattern detection

f:id:stheno2010:20210724015841p:plain

Online Implementation of STDP learning

f:id:stheno2010:20210724015857p:plain

Weight dependence: hard and soft bounds

f:id:stheno2010:20210724015910p:plain

Temporal all-to-all versus nearest-neighbor spike interaction

f:id:stheno2010:20210724015924p:plain

Aditive or Multiplicative STDP

f:id:stheno2010:20210724015934p:plain

計算論的神経科学 - ヘブ則とその機能的意味 をみた。

講義

www.youtube.com

Wight normalization: additive or multiplicative

f:id:stheno2010:20210722150337p:plain f:id:stheno2010:20210722150348p:plain

Oja learning rule as a principle component analyzer.

f:id:stheno2010:20210722150357p:plain f:id:stheno2010:20210722150408p:plain

計算論的神経科学 - rate codingのシナプス可塑性モデル をみた。

講義

www.youtube.com

How does a neuron represent information?

f:id:stheno2010:20210722121046p:plain

Hebb's postulate of activity dependent plasticity.

  • Hebbian theory: a theory in neuroscience that proposes an explanation for the adaptation of neurons in the brain during the learning process.
  • Let us assume that the persistence or repetition of reverberatory activity (or "trace") tends to induce lasting cellular axon of cell A is near enough to excite a cell B and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A's efficiency, as one of the cells firing B, is increased.
  • 教師なし学習にあたる

Synaptic plasticity: rate-coding model

f:id:stheno2010:20210722121050p:plain

This form is learning rule is unstable

f:id:stheno2010:20210722121240p:plain

Hebbian plasticity in equation -> Generalization of Hebbian learning

f:id:stheno2010:20210722121157p:plain f:id:stheno2010:20210722121254p:plain