Skip to content

Commit 1f58ab5

Browse files
committed
add TMC to postBuild
1 parent c21d3af commit 1f58ab5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

postBuild

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,29 @@ python3 -m spacy download en_core_web_sm
55
python3 -m spacy download en_core_web_md
66
python3 -m spacy download en_core_web_lg
77
python3 -m spacy download en_core_web_trf
8+
9+
# Set user
10+
USER $NB_USER
11+
12+
# Set environments for TMC
13+
ENV TMC_DIR=/opt/tmc/
14+
ENV TMC_CONFIG_DIR="${HOME}/tmc-config/tmc-tmc_cli_rust"
15+
ENV WORK_DIR=/home/$NB_USER/work/
16+
17+
# Set working directory to /opt/app
18+
WORKDIR /opt/app
19+
20+
# Set working directory to /opt/tmc
21+
WORKDIR /opt/tmc
22+
23+
# Install TMC
24+
RUN apt-get install -y --no-install-recommends curl \
25+
&& curl -0 https://raw.githubusercontent.com/rage/tmc-cli-rust/main/scripts/install.sh | bash -s x86_64 linux \
26+
# Set download location for exercises
27+
&& mkdir -p "${TMC_DIR}" \
28+
&& mkdir -p "${TMC_CONFIG_DIR}" \
29+
&& echo "projects-dir = '${WORK_DIR}'" > "${TMC_CONFIG_DIR}/config.toml" \
30+
&& fix-permissions "${HOME}" \
31+
&& fix-permissions "${TMC_DIR}" \
32+
&& apt-get purge -y --auto-remove curl \
33+
&& apt-get clean

0 commit comments

Comments
 (0)