Skip to content

Commit

Permalink
Merge pull request #44 from jmolina4/fix_gitpod
Browse files Browse the repository at this point in the history
[Fix] Gitpod setup
  • Loading branch information
lauris-tw authored Dec 4, 2023
2 parents 6576749 + 659809c commit 634688a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# You could use `gitpod/workspace-full` as well.
FROM gitpod/workspace-python

RUN pyenv install 3.10.6 \
&& pyenv global 3.10.6 \
&& pyenv shell 3.10.6
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.2.1/spark-3.2.1-bin-hadoop3.2.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.2.1-bin-hadoop3.2/bin:$PATH"


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

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

RUN pyenv install 3.9.10 && pyenv global 3.9.10
3 changes: 3 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ image:

tasks:
- init: |
pyenv shell 3.9.10
poetry env use "${HOME}/.pyenv/versions/3.9.10/bin/python3"
poetry install
poetry env info
make tests

0 comments on commit 634688a

Please sign in to comment.