Skip to content

Commit

Permalink
Bug Fixed: jq command path in install_packages.R; Quarto Version fixe…
Browse files Browse the repository at this point in the history
…d to 1.5.54; removed CR character from CR/LF line endings (dos to linux problem).
  • Loading branch information
jorgethomasm committed Jul 15, 2024
1 parent c52ebb8 commit 4cd0f8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ WORKDIR /root
RUN mkdir settings

COPY packages.json install_packages.R requirements.txt install_quarto.sh ./settings/
RUN Rscript ./settings/install_packages.R
# RUN Rscript ./settings/install_packages.R

# Installing Quarto
RUN sed -i 's/\r//' ./settings/install_quarto.sh
RUN bash ./settings/install_quarto.sh $QUARTO_VER

# Step 5 - Set Python Environment and install radian
COPY install_requirements.sh ./settings/
RUN sed -i 's/\r//' ./settings/install_requirements.sh
RUN bash ./settings/install_requirements.sh $VENV_NAME

COPY .Rprofile /
Expand Down
2 changes: 1 addition & 1 deletion install_packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ install.packages("remotes", repos = "http://cran.rstudio.com/")
#---- Load list of packages

# Set the jq query
jq_command <- 'jq -r ".packages[] | [.package, .version] | @tsv" packages.json'
jq_command <- 'jq -r ".packages[] | [.package, .version] | @tsv" ./settings/packages.json'

# Parse the json file with the list of package
raw <- system(command = jq_command, intern = TRUE)
Expand Down
7 changes: 2 additions & 5 deletions install_quarto.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env bash
QUARTO_VERSION=$1

echo "Installing Quarto version $QUARTO_VERSION"
echo "Installing Quarto version 1.5.54"

# Identify the CPU type (M1 vs Intel)
if [[ $(uname -m) == "aarch64" ]] ; then
CPU="arm64"
elif [[ $(uname -m) == "arm64" ]] ; then
Expand All @@ -12,8 +10,7 @@ else
CPU="amd64"
fi


TEMP_QUARTO="$(mktemp)" && \
wget -O "$TEMP_QUARTO" https://github.com/quarto-dev/quarto-cli/releases/download/v$QUARTO_VERSION/quarto-${QUARTO_VERSION}-linux-${CPU}.deb && \
wget -O "$TEMP_QUARTO" https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.54/quarto-1.5.54-linux-${CPU}.deb && \
sudo dpkg -i "$TEMP_QUARTO" && \
rm -f "$TEMP_QUARTO"

0 comments on commit 4cd0f8e

Please sign in to comment.