Spaces:
Runtime error
Runtime error
Paying with 'user' variable.
Browse files- Dockerfile +14 -8
Dockerfile
CHANGED
@@ -9,7 +9,13 @@ ARG INSTALL_CHANNEL=pytorch
|
|
9 |
# Automatically set by buildx
|
10 |
ARG TARGETPLATFORM
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
15 |
build-essential \
|
@@ -39,17 +45,17 @@ RUN case ${TARGETPLATFORM} in \
|
|
39 |
esac && \
|
40 |
/opt/conda/bin/conda clean -ya
|
41 |
|
42 |
-
COPY requirements.txt requirements.txt
|
43 |
RUN pip install -r requirements.txt
|
44 |
|
45 |
RUN git clone -b energy_star_dev https://github.com/huggingface/optimum-benchmark.git /optimum-benchmark && cd optimum-benchmark && pip install -e .
|
46 |
|
47 |
-
COPY ./check_h100.py /check_h100.py
|
48 |
-
COPY ./entrypoint.sh /entrypoint.sh
|
49 |
-
COPY ./pause_space.py /pause_space.py
|
50 |
-
COPY ./parse_requests.py /parse_requests.py
|
51 |
-
COPY ./runs /runs
|
52 |
-
RUN chmod 777 -R /runs
|
53 |
RUN chmod +x /entrypoint.sh
|
54 |
|
55 |
# Expose the secret DEBUG at buildtime and use its value as git remote URL
|
|
|
9 |
# Automatically set by buildx
|
10 |
ARG TARGETPLATFORM
|
11 |
|
12 |
+
RUN useradd -m -u 1000 user
|
13 |
+
WORKDIR /app
|
14 |
+
|
15 |
+
USER user
|
16 |
+
|
17 |
+
ENV HOME=/home/user \
|
18 |
+
PATH=/home/user/.local/bin:/opt/conda/bin:$PATH
|
19 |
|
20 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
21 |
build-essential \
|
|
|
45 |
esac && \
|
46 |
/opt/conda/bin/conda clean -ya
|
47 |
|
48 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
49 |
RUN pip install -r requirements.txt
|
50 |
|
51 |
RUN git clone -b energy_star_dev https://github.com/huggingface/optimum-benchmark.git /optimum-benchmark && cd optimum-benchmark && pip install -e .
|
52 |
|
53 |
+
COPY --chown=user ./check_h100.py /check_h100.py
|
54 |
+
COPY --chown=user ./entrypoint.sh /entrypoint.sh
|
55 |
+
COPY --chown=user ./pause_space.py /pause_space.py
|
56 |
+
COPY --chown=user ./parse_requests.py /parse_requests.py
|
57 |
+
COPY --chown=user ./runs /runs
|
58 |
+
#RUN chmod 777 -R /runs
|
59 |
RUN chmod +x /entrypoint.sh
|
60 |
|
61 |
# Expose the secret DEBUG at buildtime and use its value as git remote URL
|