jpndistrictのDocker環境設定

R Docker

A short description of the post.

fuuuumin https://fu-om.github.io/ByTheWay/
2021-12-08

jpndistrictのinstallに失敗する

ただの備忘録。jpndistrictを用いて、この記事に従って地図を作成しようとしたところ、installで失敗する。Windows, WSL2で実行した。

.docker-compose.ymlがrepo内にあるため、docker compose upで実行したものの、パラメータが足りずに実行できない。結局、Dockerfileから実行することにした。

実行環境: WSL2

> cat /etc/lsb-releases
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"

まずは、repoをclone。

> git clone https://github.com/uribo/jpndistrict

docker imageを作成。rstudio server実行。

> cd jpndistrict
> docker build . -t uribo/jpndistrict:latest
> docker run -e PASSWORD=password -p 8787:8787 -v $(pwd):/home/rstudio -d --name jpndistrict uribo/jpndistrict:latest

localhost:87887にアクセス。必要パッケージをインストール。

install.packages("fastmap")
install.packages("Rcpp")
remotes::install_github("uribo/jpndistrict")

以上で環境構築完了。