Commit
·
b61cb26
1
Parent(s):
cd84bc1
Fixing user startup
Browse files- Dockerfile +2 -0
- on_startup.sh +1 -23
- on_startup_user.sh +27 -0
Dockerfile
CHANGED
@@ -91,6 +91,8 @@ USER user
|
|
91 |
RUN --mount=target=requirements.txt,source=requirements.txt \
|
92 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
93 |
|
|
|
|
|
94 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
95 |
COPY --chown=user . $HOME/app
|
96 |
|
|
|
91 |
RUN --mount=target=requirements.txt,source=requirements.txt \
|
92 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
93 |
|
94 |
+
RUN --mount=target=on_startup_user.sh,source=on_startup_user.sh,readwrite \
|
95 |
+
bash on_startup.sh
|
96 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
97 |
COPY --chown=user . $HOME/app
|
98 |
|
on_startup.sh
CHANGED
@@ -3,26 +3,4 @@
|
|
3 |
# For example, to clone transformers and install it in dev mode:
|
4 |
# git clone https://github.com/huggingface/transformers.git
|
5 |
# cd transformers && pip install -e ".[dev]"
|
6 |
-
git config --global credential.helper store
|
7 |
-
|
8 |
-
## Clone the repository into a temporary directory
|
9 |
-
#git clone https://huggingface.co/derek-thomas/tgi-benchmark-notebooks /tmp/tgi-benchmark-notebooks
|
10 |
-
#
|
11 |
-
## Move the contents to $HOME/app/notebooks
|
12 |
-
#mv /tmp/tgi-benchmark-notebooks/0*.ipynb $HOME/app/notebooks
|
13 |
-
#
|
14 |
-
## Remove the temporary clone directory
|
15 |
-
#rm -rf /tmp/tgi-benchmark-notebooks
|
16 |
-
|
17 |
-
# Install llmperf
|
18 |
-
cd ~/app
|
19 |
-
git clone https://github.com/ray-project/llmperf.git
|
20 |
-
cd llmperf
|
21 |
-
git checkout afd137a
|
22 |
-
mv ~/app/setup.py .
|
23 |
-
pip install -e .
|
24 |
-
|
25 |
-
# Add dark theme
|
26 |
-
mkdir -p ~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/ && \
|
27 |
-
echo '{ "theme":"JupyterLab Dark" }' > ~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings
|
28 |
-
|
|
|
3 |
# For example, to clone transformers and install it in dev mode:
|
4 |
# git clone https://github.com/huggingface/transformers.git
|
5 |
# cd transformers && pip install -e ".[dev]"
|
6 |
+
git config --global credential.helper store
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
on_startup_user.sh
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
# Write some commands here that will run on root user before startup.
|
3 |
+
# For example, to clone transformers and install it in dev mode:
|
4 |
+
# git clone https://github.com/huggingface/transformers.git
|
5 |
+
# cd transformers && pip install -e ".[dev]"
|
6 |
+
|
7 |
+
## Clone the repository into a temporary directory
|
8 |
+
#git clone https://huggingface.co/derek-thomas/tgi-benchmark-notebooks /tmp/tgi-benchmark-notebooks
|
9 |
+
#
|
10 |
+
## Move the contents to $HOME/app/notebooks
|
11 |
+
#mv /tmp/tgi-benchmark-notebooks/0*.ipynb $HOME/app/notebooks
|
12 |
+
#
|
13 |
+
## Remove the temporary clone directory
|
14 |
+
#rm -rf /tmp/tgi-benchmark-notebooks
|
15 |
+
|
16 |
+
# Install llmperf
|
17 |
+
cd ~/app
|
18 |
+
git clone https://github.com/ray-project/llmperf.git
|
19 |
+
cd llmperf
|
20 |
+
git checkout afd137a
|
21 |
+
mv ~/app/setup.py .
|
22 |
+
pip install -e .
|
23 |
+
|
24 |
+
# Add dark theme
|
25 |
+
mkdir -p ~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/ && \
|
26 |
+
echo '{ "theme":"JupyterLab Dark" }' > ~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings
|
27 |
+
|