Spaces:
Starting
on
A10G
Starting
on
A10G
chown -R user:user Debug
Browse files- Dockerfile +1 -31
Dockerfile
CHANGED
@@ -21,43 +21,13 @@ WORKDIR /app
|
|
21 |
#RUN apt-get -y install python3
|
22 |
#RUN apt-get -y install python3-pip
|
23 |
|
24 |
-
|
25 |
-
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
26 |
-
build-essential \
|
27 |
-
ca-certificates \
|
28 |
-
ccache \
|
29 |
-
curl \
|
30 |
-
python3 \
|
31 |
-
python3-pip \
|
32 |
-
git && \
|
33 |
-
rm -rf /var/lib/apt/lists/*
|
34 |
-
|
35 |
-
# Install conda
|
36 |
-
# translating Docker's TARGETPLATFORM into mamba arches
|
37 |
-
RUN case ${TARGETPLATFORM} in \
|
38 |
-
"linux/arm64") MAMBA_ARCH=aarch64 ;; \
|
39 |
-
*) MAMBA_ARCH=x86_64 ;; \
|
40 |
-
esac && \
|
41 |
-
curl -fsSL -v -o ~/mambaforge.sh -O "https://github.com/conda-forge/miniforge/releases/download/${MAMBA_VERSION}/Mambaforge-${MAMBA_VERSION}-Linux-${MAMBA_ARCH}.sh"
|
42 |
-
RUN chmod +x ~/mambaforge.sh && \
|
43 |
-
bash ~/mambaforge.sh -b -p /opt/conda && \
|
44 |
-
rm ~/mambaforge.sh
|
45 |
-
|
46 |
-
# Install pytorch
|
47 |
-
# On arm64 we exit with an error code
|
48 |
-
RUN case ${TARGETPLATFORM} in \
|
49 |
-
"linux/arm64") exit 1 ;; \
|
50 |
-
*) /opt/conda/bin/conda update -y conda && \
|
51 |
-
/opt/conda/bin/conda install -c "${INSTALL_CHANNEL}" -c "${CUDA_CHANNEL}" -y "python=${PYTHON_VERSION}" "pytorch=$PYTORCH_VERSION" "pytorch-cuda=$(echo $CUDA_VERSION | cut -d'.' -f 1-2)" ;; \
|
52 |
-
esac && \
|
53 |
-
/opt/conda/bin/conda clean -ya
|
54 |
-
|
55 |
COPY --chown=user ./requirements.txt requirements.txt
|
56 |
|
57 |
USER user
|
58 |
|
59 |
RUN pip install -r requirements.txt
|
60 |
|
|
|
61 |
RUN git clone -b energy_star_dev https://github.com/huggingface/optimum-benchmark.git /optimum-benchmark && cd optimum-benchmark && pip install -e .
|
62 |
|
63 |
COPY --chown=user ./check_h100.py /check_h100.py
|
|
|
21 |
#RUN apt-get -y install python3
|
22 |
#RUN apt-get -y install python3-pip
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
COPY --chown=user ./requirements.txt requirements.txt
|
25 |
|
26 |
USER user
|
27 |
|
28 |
RUN pip install -r requirements.txt
|
29 |
|
30 |
+
RUN chown -R user:user ./
|
31 |
RUN git clone -b energy_star_dev https://github.com/huggingface/optimum-benchmark.git /optimum-benchmark && cd optimum-benchmark && pip install -e .
|
32 |
|
33 |
COPY --chown=user ./check_h100.py /check_h100.py
|