File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ ENV PIP_DEFAULT_TIMEOUT=100 \
13
13
JUPYTER_CONFIG_PATH="/root/.jupyter" \
14
14
IPYTHON_CONFIG_PATH="/root/.ipython" \
15
15
SERVER_PATH="/root/.server" \
16
- R_VERSION=4.4.2
16
+ R_VERSION=4.4.2 \
17
+ RUBY_VERSION=3.4.3
17
18
18
19
ENV R_HOME=/opt/R/${R_VERSION} \
19
- JAVA_HOME=/opt/java/openjdk
20
+ JAVA_HOME=/opt/java/openjdk \
21
+ RUBY_HOME=/opt/ruby/${RUBY_VERSION}
20
22
21
23
# Install Jupyter
22
24
COPY ./requirements.txt requirements.txt
@@ -78,5 +80,16 @@ RUN wget https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3
78
80
unzip ijava-1.3.0.zip && \
79
81
python install.py --sys-prefix
80
82
83
+ # Install Ruby using ruby-build
84
+ RUN git clone https://github.com/rbenv/ruby-build.git ~/.ruby-build
85
+ RUN ~/.ruby-build/bin/ruby-build ${RUBY_VERSION} ${RUBY_HOME}
86
+ ENV PATH="${RUBY_HOME}/bin:${PATH}"
87
+ ENV PATH="/root/.local/share/gem/ruby/${RUBY_VERSION%.*}.0/bin:${PATH}"
88
+
89
+ # Install IRuby
90
+ RUN gem install --user-install rubygems-requirements-system && \
91
+ gem install --user-install iruby && \
92
+ iruby register --force
93
+
81
94
# Setup entrypoint for local development
82
95
ENTRYPOINT $JUPYTER_CONFIG_PATH/start-up.sh
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ def normalize_language(language: Optional[str]) -> str:
29
29
if language == "ts" :
30
30
return "typescript"
31
31
32
+ if language == "ruby" or language == "rb" :
33
+ return "ruby3"
34
+
32
35
return language
33
36
34
37
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ ENV PIP_DEFAULT_TIMEOUT=100 \
16
16
PIP_NO_CACHE_DIR=1 \
17
17
JUPYTER_CONFIG_PATH="/root/.jupyter" \
18
18
IPYTHON_CONFIG_PATH="/root/.ipython" \
19
- SERVER_PATH="/root/.server"
19
+ SERVER_PATH="/root/.server" \
20
+ RUBY_VERSION=3.4.3
21
+
22
+ ENV RUBY_HOME=/opt/ruby/${RUBY_VERSION}
20
23
21
24
# Install Jupyter
22
25
COPY ./template/requirements.txt requirements.txt
@@ -36,6 +39,17 @@ RUN chmod +x /usr/bin/deno
36
39
RUN deno jupyter --unstable --install
37
40
COPY ./template/deno.json /root/.local/share/jupyter/kernels/deno/kernel.json
38
41
42
+ # Install Ruby using ruby-build
43
+ RUN git clone https://github.com/rbenv/ruby-build.git ~/.ruby-build
44
+ RUN ~/.ruby-build/bin/ruby-build ${RUBY_VERSION} ${RUBY_HOME}
45
+ ENV PATH="${RUBY_HOME}/bin:${PATH}"
46
+ ENV PATH="/root/.local/share/gem/ruby/${RUBY_VERSION%.*}.0/bin:${PATH}"
47
+
48
+ # Install IRuby
49
+ RUN gem install --user-install rubygems-requirements-system && \
50
+ gem install --user-install iruby && \
51
+ iruby register --force
52
+
39
53
# Create separate virtual environment for server
40
54
RUN python -m venv $SERVER_PATH/.venv
41
55
You can’t perform that action at this time.
0 commit comments