derek-thomas commited on
Commit ·
5101dda
1
Parent(s): 8d143f8
Trying to make script work on /data
Browse files- Dockerfile +3 -7
- on_startup_user.sh +2 -2
Dockerfile
CHANGED
|
@@ -59,10 +59,6 @@ RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py31
|
|
| 59 |
|
| 60 |
WORKDIR $HOME/app
|
| 61 |
|
| 62 |
-
## Create folder for notebooks
|
| 63 |
-
#RUN mkdir -p /data/notebooks && \
|
| 64 |
-
# chown user:user /data/notebooks
|
| 65 |
-
|
| 66 |
#######################################
|
| 67 |
# Start root user section
|
| 68 |
#######################################
|
|
@@ -79,7 +75,7 @@ RUN --mount=target=/root/packages.txt,source=packages.txt \
|
|
| 79 |
RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
| 80 |
bash /root/on_startup.sh
|
| 81 |
|
| 82 |
-
RUN mkdir /data && chown user:user /data
|
| 83 |
|
| 84 |
#######################################
|
| 85 |
# End root user section
|
|
@@ -91,8 +87,8 @@ USER user
|
|
| 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_user.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 |
|
|
|
|
| 59 |
|
| 60 |
WORKDIR $HOME/app
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
#######################################
|
| 63 |
# Start root user section
|
| 64 |
#######################################
|
|
|
|
| 75 |
RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
| 76 |
bash /root/on_startup.sh
|
| 77 |
|
| 78 |
+
RUN mkdir /data && chown -R user:user /data
|
| 79 |
|
| 80 |
#######################################
|
| 81 |
# End root user section
|
|
|
|
| 87 |
RUN --mount=target=requirements.txt,source=requirements.txt \
|
| 88 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
| 89 |
|
| 90 |
+
RUN --mount=target=on_startup_user.sh,source=/home/user/on_startup_user.sh,readwrite \
|
| 91 |
+
bash /home/user/on_startup_user.sh
|
| 92 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 93 |
COPY --chown=user . $HOME/app
|
| 94 |
|
on_startup_user.sh
CHANGED
|
@@ -17,8 +17,8 @@
|
|
| 17 |
cd /data
|
| 18 |
git clone https://github.com/ray-project/llmperf.git
|
| 19 |
cd llmperf
|
| 20 |
-
git checkout afd137a
|
| 21 |
-
pip install -e .
|
| 22 |
|
| 23 |
# Get notebooks
|
| 24 |
git clone https://huggingface.co/derek-thomas/tgi-notebooks-optimization /tmp/tgi-notebooks-optimization
|
|
|
|
| 17 |
cd /data
|
| 18 |
git clone https://github.com/ray-project/llmperf.git
|
| 19 |
cd llmperf
|
| 20 |
+
git checkout afd137a || exit 1
|
| 21 |
+
pip install -e . || exit 1
|
| 22 |
|
| 23 |
# Get notebooks
|
| 24 |
git clone https://huggingface.co/derek-thomas/tgi-notebooks-optimization /tmp/tgi-notebooks-optimization
|