Skip to content

Commit

Permalink
Simplify gitpod setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lauris-tw committed Jun 18, 2024
1 parent c130c11 commit 2928c8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
10 changes: 3 additions & 7 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@ USER root
WORKDIR /opt
RUN if [ "$(arch)" = "aarch64" ] ; then ARCHITECTURE="aarch64" ; else ARCHITECTURE="x64"; fi && \
wget -O OpenJDK.tar.gz https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_${ARCHITECTURE}_linux_hotspot_11.0.11_9.tar.gz && \
wget -O scala.tgz https://downloads.lightbend.com/scala/2.13.5/scala-2.13.5.tgz && \
wget -O spark-hadoop.tgz https://archive.apache.org/dist/spark/spark-3.5.1/spark-3.5.1-bin-hadoop3.tgz
RUN tar xzf OpenJDK.tar.gz && \
tar xvf scala.tgz && \
tar xvf spark-hadoop.tgz
ENV PATH="/opt/jdk-11.0.11+9/bin:/opt/scala-2.13.5/bin:/opt/spark-3.5.1-bin-hadoop3/bin:$PATH"

ENV JAVA_HOME="/opt/jdk-11.0.11+9" \
PATH="/opt/jdk-11.0.11+9/bin:$PATH"

#TODO : Change the user to non root user
#USER 185
WORKDIR /app

COPY ./pyproject.toml /app/pyproject.toml

RUN pyenv install 3.11.4 && pyenv global 3.11.4
RUN pyenv install 3.11.4 && pyenv global 3.11.4 && poetry env use "${HOME}/.pyenv/versions/3.11.4/bin/python3"
6 changes: 2 additions & 4 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ image:

tasks:
- init: |
pyenv install 3.11.4
pyenv shell 3.11.4
poetry env use "${HOME}/.pyenv/versions/3.11.4/bin/python3"
poetry install
poetry env info
make tests
poetry run python -m pytest test/unit
poetry run python -m pytest tests/integration

0 comments on commit 2928c8e

Please sign in to comment.