Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 49 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,27 +91,66 @@ The instances are created using the EC2 client of AWS CLI. Into the `./infrastru
```jsx
{
ImageId: 'ami-0130bec6e5047f596', // this iam can be found right to the name of the instance when a new instance is launched by hand, this id is unique by region
InstanceType: 't2.micro', // size of the instance
InstanceType: 't3.micro', // size of the instance
KeyName: KEY_NAME,
MaxCount: 1,
MinCount: 1,
SecurityGroupIds: [SECURTY_GROUP], // security group created on step 3
IamInstanceProfile: {
Name: INSTANCE_PROFILE,
},
BlockDeviceMappings: [
{
DeviceName: '/dev/sda1',
Ebs: {
DeleteOnTermination: true,
VolumeSize: 16, // size in GB
VolumeType: 'gp3',
},
},
],
UserData: `#!/bin/bash
sudo mkdir /home/ubuntu/docker-runner
cd /home/ubuntu/docker-runner
sudo chown -R $USER:$USER /home/ubuntu/docker-runner

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt install docker -y
sudo apt install docker.io -y
sudo service docker start
sudo chmod 666 /var/run/docker.sock
sudo apt install awscli -y

# install Docker
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# add current user to "docker" group (to allow running docker without sudo)
sudo usermod -aG docker $USER
newgrp docker

# install AWS CLI
sudo apt-get install -y unzip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
rm -r aws
rm awscliv2.zip

# login to Amazon ECR
aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin ${ACCOUNT}
docker pull ${ACCOUNT}/rstudio
sudo docker run -d -p 8787:8787 -e DISABLE_AUTH=true ${ACCOUNT}/rstudio

# pull rstudio image
docker pull ${ACCOUNT}/rstudio:1.1

# run rstudio container
sudo docker run -d -p 8787:8787 -e DISABLE_AUTH=true --restart always ${ACCOUNT}/rstudio:1.1
`,
TagSpecifications: [
{
Expand Down Expand Up @@ -235,7 +274,7 @@ Procfile
STRING_TO_REPLACE: process.env.STRING_TO_REPLACE,
ROUTE_TO_REPLACE: process.env.ROUTE_TO_REPLACE,
TIMEOUT_INSTANCE: process.env.TIMEOUT_INSTANCE,
PROXY_KEY: process.env.PROXY_KEY
PROXY_KEY: process.env.PROXY_KEY,
}
```

Expand Down Expand Up @@ -274,7 +313,7 @@ module.exports = {
ROUTE_TO_REPLACE: process.env.ROUTE_TO_REPLACE,
STRING_TO_REPLACE: process.env.STRING_TO_REPLACE,
TIMEOUT_INSTANCE: process.env.TIMEOUT_INSTANCE,
PROXY_KEY: process.env.PROXY_KEY
PROXY_KEY: process.env.PROXY_KEY,
}
```

Expand Down
96 changes: 67 additions & 29 deletions RStudioDocker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,86 @@
FROM rocker/rstudio:latest
FROM rocker/rstudio:4.5.1

RUN apt-get update
# RUN apt-get remove libpq5 -y
RUN apt-get install libpq-dev r-cran-rgl -y
RUN apt-get install -y \
default-jre \
default-jdk \
libpq-dev \
libxml2-dev \
libudunits2-dev \
libgeos-dev \
libglu1-mesa-dev \
r-cran-rgl \
r-cran-rjava

RUN R CMD javareconf

RUN apt-get install -y \
libcairo2-dev \
libgdal-dev \
libfontconfig1-dev \
libgit2-dev \
libglu1-mesa-dev \
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The libglu1-mesa-dev package is installed twice - once on line 12 and again on line 23. Remove the duplicate installation to keep the Dockerfile clean and efficient.

Suggested change
libglu1-mesa-dev \

Copilot uses AI. Check for mistakes.
libproj-dev \
r-cran-hmisc \
r-cran-rodbc \
r-cran-vegan \
unixodbc \
unixodbc-dev
# libiodbc2-dev \

RUN install2.r --error dplyr
RUN install2.r --error \
sqldf \
jsonlite \
httr \
jsonlite \
sqldf \
zip

RUN install2.r --error -r 'http://cran.r-project.org' \
data.table \
desc \
dplyr \
RPostgreSQL \
reshape \
reshape2 \
random \
gsubfn \
DT \
evaluate \
Formula \
ggExtra \
gsubfn \
Hmisc \
jpeg \
knitr \
lattice \
lazyeval \
locfit \
DataCombine \
lmfor \
markdown \
nortest \
outliers \
png \
random \
rentrez \
reshape \
reshape2 \
rlang \
rmarkdown \
RPostgreSQL \
RSQLite \
rmarkdown

RUN apt-get install -y r-cran-rjava default-jre default-jdk libxml2-dev libudunits2-dev libgeos-dev
RUN R CMD javareconf

RUN install2.r --error -r 'http://cran.r-project.org' XLConnect rentrez
RUN install2.r --error -r 'http://cran.r-project.org' lmfor survey survival DT lattice png jpeg vegan sampling sp markdown nortest outliers SamplingBigData scales spatial whisker

RUN apt-get install -y libglu1-mesa-dev
RUN apt-get install -y libiodbc2-dev
RUN apt-get install -y unixodbc unixodbc-dev r-cran-rodbc libgdal-dev libproj-dev
RUN apt-get install -y r-cran-hmisc libfontconfig1-dev libcairo2-dev
RUN apt-get install -y libgit2-dev r-cran-vegan
sampling \
SamplingBigData \
scales \
sp \
spatial \
stringr \
srvyr \
survey \
survival \
vegan \
whisker \
XLConnect
# BIOMASS \
# DataCombine \
# rgdal \
# sf \

RUN install2.r --error -r 'http://cran.r-project.org' sf rgdal
RUN install2.r --error -r 'http://cran.r-project.org' Hmisc
RUN install2.r --error -r 'https://mac.R-project.org' mapview
RUN install2.r --error -r 'http://cran.r-project.org' ggExtra BIOMASS
# RUN install2.r --error -r 'https://mac.R-project.org' mapview

RUN apt-get autoclean -y
RUN apt-get autoremove -y
Loading