Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed Onboarding #2572

Merged
merged 1 commit into from
Aug 18, 2024
Merged

Completed Onboarding #2572

merged 1 commit into from
Aug 18, 2024

Conversation

npjd
Copy link
Contributor

@npjd npjd commented Aug 18, 2024

Completed start-here and the ms-macro-passage indexing, retrieval, and evaluation

Environment

CS Student Linux Server

Ubuntu 22.04.4 LTS
Python 3.10.12 (Default on Linux Server)
java 21.0.4
Apache Maven 3.9.5

Issues while setting up

  • The linux server by default comes w/ Java 11 which is out of date for building (ran into this issue and had to change $PATH)
  • Also had to run ulimit -t unlimited to give unlimited CPU time

It could be worth re-opening this issue and adding to the documentation how to update java + maven

@lintool
Copy link
Member

lintool commented Aug 18, 2024

  • The linux server by default comes w/ Java 11 which is out of date for building (ran into this issue and had to change $PATH)
  • Also had to run ulimit -t unlimited to give unlimited CPU time

hi @npjd can you share how you upgraded Java on the student linux server?

@lintool lintool merged commit 27ab458 into castorini:master Aug 18, 2024
1 check passed
@npjd
Copy link
Contributor Author

npjd commented Aug 18, 2024

  • The linux server by default comes w/ Java 11 which is out of date for building (ran into this issue and had to change $PATH)
  • Also had to run ulimit -t unlimited to give unlimited CPU time

hi @npjd can you share how you upgraded Java on the student linux server?

For upgrading Java to version 21

  1. First download the OpenJDK 21 tarball
    wget https://download.oracle.com/java/21/archive/jdk-21.0.3_linux-x64_bin.tar.gz
  2. Extract the tarball to java home folder
mkdir -p ~/java
tar -xzf jdk-21.0.3_linux-x64_bin.tar.gz-C ~/java
  1. Update $PATH and $JAVA_PATH in ~/.bashrc
    Your ~/.bashrc should have a $JAVA_HOME and updated $PATH
export JAVA_HOME=~/java/jdk-21.0.3
export PATH=$JAVA_HOME/bin:$PATH
  1. Run source ~/.bashrc to update changes. Run java --version to verify everything

Extra, something I did is setup my ~/.bash_profile so everytime I SSH in so there's no need to run source ~/.bashrc

npourjaf@ubuntu2204-014:~$ cat ~/.bash_profile
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

Updating Maven is very similar

  1. Get the tarball
    wget https://downloads.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz
  2. Extract the tarball
mkdir -p ~/maven
tar -xzf apache-maven-3.9.5-bin.tar.gz -C ~/maven
  1. Update $PATH and M2_HOME in ~/.bashrc
npourjaf@ubuntu2204-014:~$ cat ~/.bashrc

export M2_HOME=~/maven/apache-maven-3.9.5
export JAVA_HOME=~/java/jdk-21.0.3 # from previous step
export PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH 
  1. source ~/.bashrc to update changes. Run mvn --version to verify changes

I'd be happy to make this more readable + add it to the README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants