Skip to content

MPNST samples generation is failing due to a dependency issue #204

Closed
@jjacobson95

Description

@jjacobson95

Reproduced twice, same error each time.

Error:

b'Error in library(synapser) : there is no package called \xe2\x80\x98synapser\xe2\x80\x99\nExecution halted\n'

Context:
The synapser R package is not being properly downloaded into the docker image, causing the build pipeline to fail. The reason is unknown, however it looks like you may have dealt with a dependency issue related to this recently.

Tracing the code we can see that the mpnst Dockerfile has an updated R base and instructions to install the requirements.r file. The requirements.r file includes the synapser package although the 'repos' argument differs from the documentation which was most recently updated on 8/21/24.

Dockerfile build logs confirm this is not installing correctly.

#106 215.4 ERROR: dependency ‘rjson’ is not available for package ‘synapser’
#106 215.4 * removing ‘/usr/local/lib/R/site-library/synapser’
#106 215.4 
#106 215.4 The downloaded source packages are in
#106 215.4      ‘/tmp/Rtmp0MtMyd/downloaded_packages’
#106 215.4 Warning message:
#106 215.4 In install.packages("synapser", repos = c("http://ran.synapse.org",  :
#106 215.4   installation of package ‘synapser’ had non-zero exit status
#106 215.4 Installing package into ‘/usr/local/lib/R/site-library’
#106 215.4 (as ‘lib’ is unspecified)
#106 215.8 also installing the dependencies ‘R.oo’, ‘R.methodsS3’

To fix, I will try updating the 'repos' argument in install.packages, and adding rjson to the requirements.r file.

Note:
If we create stable docker images, we should make sure to add a test for this.

To Reproduce:

  • Environment:
    • AWS EC2 Instance:
      • Amazon Linux 2 AMI (HVM) – Kernel 5.10, SSD Volume Type
      • Architecture: 64-bit x86
      • Instance Type: t2.2xlarge
      • Storage Amount: 60Gb
      • vCPUs: 8
      • Subnet: coderdata-Public Subnet A
      • Public IP
    • Setup:
      • I ran the two setup scripts (aws_1.sh and aws_2.sh) provided at the end of this issue, while refreshing the page between them for docker setup. I used the requirements.txt file from an older version of the repo as well. Then I set the Auth tokens.
      • Python Version 3.10.4
      • Docker Engine Version: 25.0.6
      • Docker Compose version: v2.29.2
    • Command:
      • nohup python3.10 build/build_all.py --all --pypi --figshare --version 0.1.41 > output_2.log 2>&1 &

aws_1.sh: Setup script 1


# Install Git
sudo yum install git -y

# Clone the repository
git clone https://github.com/PNNL-CompBio/coderdata.git

# Install Docker and configure it
sudo amazon-linux-extras install docker -y
sudo service docker start
sudo systemctl enable docker
sudo usermod -a -G docker ec2-user

sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

echo "Part 1 completed successfully!"

aws_2.sh: Setup script 2

#!/bin/bash

# Display Docker info
docker info

# Install development tools
sudo yum groupinstall "Development Tools" -y

# Erase previous OpenSSL development files
sudo yum erase openssl-devel -y

# Install required libraries
sudo yum install openssl11 openssl11-devel libffi-devel bzip2-devel wget -y

# Download and install Python 3.10
wget https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tgz
tar -xf Python-3.10.4.tgz
cd Python-3.10.4
./configure --enable-optimizations
make -j $(nproc)
sudo make altinstall

# Install pip for Python 3.10
sudo yum install python3-pip -y

# Change directory to coderdata and install requirements
cd ~/coderdata
pip3.10 install -r requirements.txt

# Set SYNAPSE_AUTH_TOKEN if provided
if [ -n "$1" ]; then
  export SYNAPSE_AUTH_TOKEN="$1"
  echo "SYNAPSE_AUTH_TOKEN set to $1"
else
  echo "No token provided; proceed without authentication token."
fi

echo "Part 2 completed successfully!"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions