Spaces:
Sleeping
Sleeping
Commit
·
3b310ad
1
Parent(s):
4a9e89a
- Dockerfile +16 -9
Dockerfile
CHANGED
@@ -2,13 +2,20 @@
|
|
2 |
# docker build -t gkrz/lgatr:v4 .
|
3 |
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
|
4 |
|
5 |
-
WORKDIR /app
|
6 |
|
|
|
|
|
7 |
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
|
|
|
12 |
|
13 |
RUN apt update && \
|
14 |
DEBIAN_FRONTEND=noninteractive apt install --yes --no-install-recommends \
|
@@ -76,7 +83,7 @@ RUN python3 -m pip cache purge
|
|
76 |
|
77 |
# COPY docker/ext_packages /docker/ext_packages
|
78 |
# RUN python3 /docker/ext_packages/install_upstream_python_packages.py
|
79 |
-
RUN mkdir -p /opt/pepr
|
80 |
|
81 |
# Install GATr
|
82 |
#RUN cd /opt/pepr && git clone https://github.com/Qualcomm-AI-research/geometric-algebra-transformer.git geometric-algebra-transformer1
|
@@ -84,16 +91,16 @@ RUN mkdir -p /opt/pepr
|
|
84 |
|
85 |
|
86 |
# Install L-GATr - for some reason this only works if executed from the already-built container
|
87 |
-
RUN cd /opt/pepr && git clone https://github.com/gregorkrz/lorentz-gatr lgatr
|
88 |
-
RUN cd /opt/pepr/lgatr/ && python3 -m pip install .
|
89 |
RUN ls /usr/local/lib/python3.10/dist-packages/lgatr
|
90 |
RUN ls /usr/local/lib/python3.10/dist-packages/lgatr/layers
|
91 |
# Install torch_cmspepr
|
92 |
|
93 |
-
RUN cd /opt/pepr && git clone https://github.com/cms-pepr/pytorch_cmspepr
|
94 |
-
RUN cd /opt/pepr/pytorch_cmspepr/ && python3 -m pip install .
|
95 |
|
96 |
-
COPY .
|
97 |
|
98 |
# entrypoint run app.py with python
|
99 |
EXPOSE 7860
|
|
|
2 |
# docker build -t gkrz/lgatr:v4 .
|
3 |
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
|
4 |
|
|
|
5 |
|
6 |
+
# Set up a new user named "user" with user ID 1000
|
7 |
+
RUN useradd -m -u 1000 user
|
8 |
|
9 |
|
10 |
+
# Set home to the user's home directory
|
11 |
+
ENV HOME=/home/user \
|
12 |
+
PATH=/home/user/.local/bin:$PATH
|
13 |
+
|
14 |
+
# Set the working directory to the user's home directory
|
15 |
+
WORKDIR $HOME/app
|
16 |
|
17 |
+
|
18 |
+
SHELL ["/bin/bash", "-c"]
|
19 |
|
20 |
RUN apt update && \
|
21 |
DEBIAN_FRONTEND=noninteractive apt install --yes --no-install-recommends \
|
|
|
83 |
|
84 |
# COPY docker/ext_packages /docker/ext_packages
|
85 |
# RUN python3 /docker/ext_packages/install_upstream_python_packages.py
|
86 |
+
RUN mkdir -p $HOME/opt/pepr
|
87 |
|
88 |
# Install GATr
|
89 |
#RUN cd /opt/pepr && git clone https://github.com/Qualcomm-AI-research/geometric-algebra-transformer.git geometric-algebra-transformer1
|
|
|
91 |
|
92 |
|
93 |
# Install L-GATr - for some reason this only works if executed from the already-built container
|
94 |
+
RUN cd $HOME/opt/pepr && git clone https://github.com/gregorkrz/lorentz-gatr lgatr
|
95 |
+
RUN cd $HOME/opt/pepr/lgatr/ && python3 -m pip install .
|
96 |
RUN ls /usr/local/lib/python3.10/dist-packages/lgatr
|
97 |
RUN ls /usr/local/lib/python3.10/dist-packages/lgatr/layers
|
98 |
# Install torch_cmspepr
|
99 |
|
100 |
+
RUN cd $HOME/opt/pepr && git clone https://github.com/cms-pepr/pytorch_cmspepr
|
101 |
+
RUN cd $HOME/opt/pepr/pytorch_cmspepr/ && python3 -m pip install .
|
102 |
|
103 |
+
COPY --chown=user . $HOME/app
|
104 |
|
105 |
# entrypoint run app.py with python
|
106 |
EXPOSE 7860
|