Spaces:
Sleeping
Sleeping
File size: 4,124 Bytes
61b5223 e75a247 61b5223 3b310ad 4a9e89a e75a247 3b310ad e75a247 3b310ad e75a247 18fc089 e75a247 61b5223 76767c2 41fdf78 61b5223 e75a247 44b7575 e75a247 96e40d3 0407605 d174ad1 9fc807b e75a247 3b310ad e75a247 6dd6809 e75a247 3b310ad 0407605 e75a247 3b310ad 5890620 3b310ad 5667bd5 4a9e89a e75a247 5890620 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
## gkrz/lgatr:v3
# docker build -t gkrz/lgatr:v4 .
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
SHELL ["/bin/bash", "-c"]
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install --yes --no-install-recommends \
build-essential \
cmake \
ffmpeg \
git \
python-is-python3 \
python3-dev \
python3-pip \
&& \
rm -rf /var/lib/apt/lists/*
RUN python3.10 --version
RUN python3 --version
RUN python --version
RUN python3 -m pip install --no-cache-dir --upgrade pip
#python3 -m pip install --no-cache-dir --upgrade --requirement requirements.txt
RUN python3 -m pip install numba==0.58.1
# packages without conda
# RUN python3 -m pip install --no-cache-dir torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117
RUN python3 -m pip install torch==2.5.0 torchvision torchaudio
RUN python3 -m pip install torch_geometric
#RUN python3 -m pip install torch_scatter torch_sparse
#RUN python3 -m pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.1.html
#RUN python3 -m pip install torch-sparse -f https://data.pyg.org/whl/torch-2.5.1.html
#RUN python3 -m pip install torch-cluster -f https://data.pyg.org/whl/torch-2.5.1.html
RUN python3 -m pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv xformers==0.0.29.post1 -f https://data.pyg.org/whl/torch-2.5.0+cpu.html
RUN python3 -m pip install pytorch-lightning yacs torchmetrics
RUN python3 -m pip install performer-pytorch
RUN python3 -m pip install tensorboardX
RUN python3 -m pip install ogb
RUN python3 -m pip install wandb
RUN python3 -m pip install seaborn
RUN python3 -m pip install dgl
RUN python3 -m pip install numpy
RUN python3 -m pip install scipy
RUN python3 -m pip install pandas
RUN python3 -m pip install scikit-learn
RUN python3 -m pip install matplotlib
RUN python3 -m pip install tqdm
RUN python3 -m pip install PyYAML
RUN python3 -m pip install awkward0
RUN python3 -m pip install uproot
RUN python3 -m pip install awkward
RUN python3 -m pip install vector
RUN python3 -m pip install lz4
RUN python3 -m pip install xxhash
RUN python3 -m pip install tables
RUN python3 -m pip install tensorboard
RUN python3 -m pip install plotly
RUN python3 -m pip install fastjet
RUN python3 -m pip install gradio
RUN python3 -m pip install huggingface_hub
RUN python3 -m pip install hdbscan
#RUN python3 -m pip install lgatr # This doesn't work
RUN python3 -c "\
from huggingface_hub import snapshot_download; \
snapshot_download(repo_id='gregorkrzmanc/jetclustering', local_dir='models/'); \
snapshot_download(repo_id='gregorkrzmanc/jetclustering_demo', local_dir='demo_datasets/', repo_type='dataset')"
# remove pip cache
RUN python3 -m pip cache purge
# COPY docker/ext_packages /docker/ext_packages
# RUN python3 /docker/ext_packages/install_upstream_python_packages.py
RUN mkdir -p $HOME/opt/pepr
# Install GATr
#RUN cd /opt/pepr && git clone https://github.com/Qualcomm-AI-research/geometric-algebra-transformer.git geometric-algebra-transformer1
#RUN cd /opt/pepr/geometric-algebra-transformer1/ && python3 -m pip install .
# Install L-GATr - for some reason this only works if executed from the already-built container
RUN cd $HOME/opt/pepr && git clone https://github.com/gregorkrz/lorentz-gatr lgatr
RUN cd $HOME/opt/pepr/lgatr/ && python3 -m pip install .
RUN ls /usr/local/lib/python3.10/dist-packages/lgatr
RUN ls /usr/local/lib/python3.10/dist-packages/lgatr/layers
# Install torch_cmspepr
RUN cd $HOME/opt/pepr && git clone https://github.com/cms-pepr/pytorch_cmspepr
RUN cd $HOME/opt/pepr/pytorch_cmspepr/ && python3 -m pip install .
COPY --chown=user . $HOME/app
USER root
RUN chmod -R 777 $HOME
USER user
# entrypoint run app.py with python
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
CMD ["python", "app.py"]
|