jbilcke-hf HF staff commited on
Commit
5ff1b90
1 Parent(s): 1e768bf

clarification about licensing

Browse files
Files changed (4) hide show
  1. Dockerfile +37 -2
  2. GAUSSIAN-SPLATTING-LICENSE.txt +83 -0
  3. README.md +14 -2
  4. tmp.txt +0 -147
Dockerfile CHANGED
@@ -19,7 +19,16 @@ RUN apt --yes install build-essential wget curl rpl
19
  RUN echo "Build started at: $(date "+%Y-%m-%d %H:%M")"
20
 
21
  # NodeJS - LEGACY/DEPRECATED WAY
22
- RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
 
 
 
 
 
 
 
 
 
23
  RUN apt --yes install nodejs
24
 
25
  # git and file management
@@ -97,10 +106,36 @@ RUN git clone --recursive https://github.com/MrNeRF/gaussian-splatting-cuda
97
 
98
  WORKDIR $HOME/app/gaussian-splatting-cuda
99
 
100
- # for quick testing we disabled the rest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
 
102
  COPY --chown=user . $HOME/app/gaussian-splatting-cuda
103
 
 
104
  WORKDIR $HOME/app
105
 
106
  RUN echo "Build ended at: $(date "+%Y-%m-%d %H:%M")"
 
19
  RUN echo "Build started at: $(date "+%Y-%m-%d %H:%M")"
20
 
21
  # NodeJS - LEGACY/DEPRECATED WAY
22
+ #RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
23
+ #RUN apt --yes install nodejs
24
+
25
+ # NodeJS - NEW, MORE ANNOYING WAY
26
+ RUN apt --yes install -y ca-certificates gnupg
27
+ RUN mkdir -p /etc/apt/keyrings
28
+ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
29
+ ENV NODE_MAJOR=18
30
+ RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
31
+ RUN apt update
32
  RUN apt --yes install nodejs
33
 
34
  # git and file management
 
106
 
107
  WORKDIR $HOME/app/gaussian-splatting-cuda
108
 
109
+ RUN wget https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu118.zip
110
+ RUN unzip libtorch-cxx11-abi-shared-with-deps-2.0.1+cu118.zip -d external/
111
+ RUN rm libtorch-cxx11-abi-shared-with-deps-2.0.1+cu118.zip
112
+
113
+ # Build (on CPU, this will add compute_35 as build target, which we do not want)
114
+ # There seems to be a work around, see this thread:
115
+ # https://github.com/MrNeRF/gaussian-splatting-cuda/issues/14
116
+ # here is the hack:
117
+ #
118
+ # Replace "native" by "all"
119
+ # inspired by https://github.com/ztxz16/fastllm/pull/309/files
120
+ #
121
+ # CUDA architectures are defined as codes
122
+ # by default CMake detected:
123
+ # 3.5;5.0;8.0;8.6;8.9;9.0
124
+ # To see the mapping: https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
125
+ # A10G and A100 -> Ampere -> sm_80, sm_86, sm_87 -> 8.0;8.6;8.7
126
+ # Nvidia T4 -> Turing -> sm_75 -> 7.5
127
+ # ? -> Lovelace -> sm_89 -> 8.6
128
+ # ? -> Hopper -> sm_90 -> 9.0
129
+ RUN find . -name CMakeLists.txt -exec sed -i 's/CUDA_ARCHITECTURES native/CUDA_ARCHITECTURES all/' {} +
130
+
131
+ #RUN cmake -B build -D CMAKE_BUILD_TYPE=Release -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.2/ -D CUDA_VERSION=12.2
132
+ # Let's try to downgrade the version
133
+ RUN cmake -B build -D CMAKE_BUILD_TYPE=Release -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.8/ -D CUDA_VERSION=11.8
134
+ RUN cmake --build build -- -j8
135
 
136
  COPY --chown=user . $HOME/app/gaussian-splatting-cuda
137
 
138
+ # Set the working directory to the user's home directory
139
  WORKDIR $HOME/app
140
 
141
  RUN echo "Build ended at: $(date "+%Y-%m-%d %H:%M")"
GAUSSIAN-SPLATTING-LICENSE.txt ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Gaussian-Splatting License
2
+ ===========================
3
+
4
+ **Inria** and **the Max Planck Institut for Informatik (MPII)** hold all the ownership rights on the *Software* named **gaussian-splatting**.
5
+ The *Software* is in the process of being registered with the Agence pour la Protection des
6
+ Programmes (APP).
7
+
8
+ The *Software* is still being developed by the *Licensor*.
9
+
10
+ *Licensor*'s goal is to allow the research community to use, test and evaluate
11
+ the *Software*.
12
+
13
+ ## 1. Definitions
14
+
15
+ *Licensee* means any person or entity that uses the *Software* and distributes
16
+ its *Work*.
17
+
18
+ *Licensor* means the owners of the *Software*, i.e Inria and MPII
19
+
20
+ *Software* means the original work of authorship made available under this
21
+ License ie gaussian-splatting.
22
+
23
+ *Work* means the *Software* and any additions to or derivative works of the
24
+ *Software* that are made available under this License.
25
+
26
+
27
+ ## 2. Purpose
28
+ This license is intended to define the rights granted to the *Licensee* by
29
+ Licensors under the *Software*.
30
+
31
+ ## 3. Rights granted
32
+
33
+ For the above reasons Licensors have decided to distribute the *Software*.
34
+ Licensors grant non-exclusive rights to use the *Software* for research purposes
35
+ to research users (both academic and industrial), free of charge, without right
36
+ to sublicense.. The *Software* may be used "non-commercially", i.e., for research
37
+ and/or evaluation purposes only.
38
+
39
+ Subject to the terms and conditions of this License, you are granted a
40
+ non-exclusive, royalty-free, license to reproduce, prepare derivative works of,
41
+ publicly display, publicly perform and distribute its *Work* and any resulting
42
+ derivative works in any form.
43
+
44
+ ## 4. Limitations
45
+
46
+ **4.1 Redistribution.** You may reproduce or distribute the *Work* only if (a) you do
47
+ so under this License, (b) you include a complete copy of this License with
48
+ your distribution, and (c) you retain without modification any copyright,
49
+ patent, trademark, or attribution notices that are present in the *Work*.
50
+
51
+ **4.2 Derivative Works.** You may specify that additional or different terms apply
52
+ to the use, reproduction, and distribution of your derivative works of the *Work*
53
+ ("Your Terms") only if (a) Your Terms provide that the use limitation in
54
+ Section 2 applies to your derivative works, and (b) you identify the specific
55
+ derivative works that are subject to Your Terms. Notwithstanding Your Terms,
56
+ this License (including the redistribution requirements in Section 3.1) will
57
+ continue to apply to the *Work* itself.
58
+
59
+ **4.3** Any other use without of prior consent of Licensors is prohibited. Research
60
+ users explicitly acknowledge having received from Licensors all information
61
+ allowing to appreciate the adequacy between of the *Software* and their needs and
62
+ to undertake all necessary precautions for its execution and use.
63
+
64
+ **4.4** The *Software* is provided both as a compiled library file and as source
65
+ code. In case of using the *Software* for a publication or other results obtained
66
+ through the use of the *Software*, users are strongly encouraged to cite the
67
+ corresponding publications as explained in the documentation of the *Software*.
68
+
69
+ ## 5. Disclaimer
70
+
71
+ THE USER CANNOT USE, EXPLOIT OR DISTRIBUTE THE *SOFTWARE* FOR COMMERCIAL PURPOSES
72
+ WITHOUT PRIOR AND EXPLICIT CONSENT OF LICENSORS. YOU MUST CONTACT INRIA FOR ANY
73
+ UNAUTHORIZED USE: [email protected] . ANY SUCH ACTION WILL
74
+ CONSTITUTE A FORGERY. THIS *SOFTWARE* IS PROVIDED "AS IS" WITHOUT ANY WARRANTIES
75
+ OF ANY NATURE AND ANY EXPRESS OR IMPLIED WARRANTIES, WITH REGARDS TO COMMERCIAL
76
+ USE, PROFESSIONNAL USE, LEGAL OR NOT, OR OTHER, OR COMMERCIALISATION OR
77
+ ADAPTATION. UNLESS EXPLICITLY PROVIDED BY LAW, IN NO EVENT, SHALL INRIA OR THE
78
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
79
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
80
+ GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS OR BUSINESS INTERRUPTION)
81
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
82
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING FROM, OUT OF OR
83
+ IN CONNECTION WITH THE *SOFTWARE* OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE*.
README.md CHANGED
@@ -5,7 +5,7 @@ colorFrom: green
5
  colorTo: yellow
6
  sdk: docker
7
  pinned: true
8
- app_port: 3000
9
  ---
10
 
11
  ## Presentation
@@ -14,7 +14,19 @@ app_port: 3000
14
 
15
  Gaussian Splatting API is a REST API to generate 3D Gaussian Splatting scenes from a set of images.
16
 
17
- ### What is the licence?
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  ## Running on your machine
20
 
 
5
  colorTo: yellow
6
  sdk: docker
7
  pinned: true
8
+ app_port: 7860
9
  ---
10
 
11
  ## Presentation
 
14
 
15
  Gaussian Splatting API is a REST API to generate 3D Gaussian Splatting scenes from a set of images.
16
 
17
+ It is a wrapper around [MrNERF/gaussian-splatting-cuda](https://github.com/MrNeRF/gaussian-splatting-cuda).
18
+
19
+ ### License
20
+
21
+ The server wrapping code is open-source, but the code engine [gaussian-splatting-cuda](https://github.com/MrNeRF/gaussian-splatting-cuda) is based on [project by the Inria and the Max Planck Institut for Informatik (MPII)](https://github.com/graphdeco-inria/gaussian-splatting).
22
+
23
+ This is a [publicly funded project](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/) with a [non-commercial license](GAUSSIAN-SPLATTING-LICENCE.md).
24
+
25
+ ### So I can't use it for commercial apps?
26
+
27
+ You will have to talk with the original rightholders at the INRIA and MPII.
28
+
29
+ Also, please tell if you know about any alternative project with a fully permissive open-source licensing.
30
 
31
  ## Running on your machine
32
 
tmp.txt DELETED
@@ -1,147 +0,0 @@
1
- #FROM nvidia/cuda:12.2.0-devel-ubuntu20.04
2
- # let's try to downgrade the version of CUDA
3
- FROM nvidia/cuda:11.8.0-devel-ubuntu20.04
4
-
5
- LABEL maintainer="Hugging Face"
6
-
7
- ARG DEBIAN_FRONTEND=noninteractive
8
-
9
- # Use login shell to read variables from `~/.profile` (to pass dynamic created variables between RUN commands)
10
- SHELL ["sh", "-lc"]
11
-
12
- # WORKDIR /workdir
13
-
14
- RUN apt update
15
-
16
- # base stuff
17
- RUN apt --yes install build-essential wget curl rpl
18
-
19
- RUN echo "Build started at: $(date "+%Y-%m-%d %H:%M")"
20
-
21
- # NodeJS - LEGACY/DEPRECATED WAY
22
- #RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
23
- #RUN apt --yes install nodejs
24
-
25
- # NodeJS - NEW, MORE ANNOYING WAY
26
- RUN apt --yes install -y ca-certificates gnupg
27
- RUN mkdir -p /etc/apt/keyrings
28
- RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
29
- ENV NODE_MAJOR=18
30
- RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
31
- RUN apt update
32
- RUN apt --yes install nodejs
33
-
34
- # git and file management
35
- RUN apt --yes install git git-lfs unzip
36
- RUN git lfs install
37
-
38
- # Python
39
- RUN apt --yes install python3 python3-pip
40
- RUN python3 -m pip install --no-cache-dir --upgrade pip
41
-
42
-
43
- # required for CMake it seems
44
- RUN apt --yes install libtbb-dev libeigen3-dev g++ libssl-dev checkinstall
45
-
46
-
47
- # The app require CMake 3.24+ but this version of Ubuntu only has the 3.16
48
- # So we need to install a more recent version
49
- #RUN apt-get update \
50
- # && rm -rf /var/lib/apt/lists/* \
51
- RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-Linux-x86_64.sh \
52
- -q -O /tmp/cmake-install.sh \
53
- && chmod u+x /tmp/cmake-install.sh \
54
- && mkdir /opt/cmake-3.24.1 \
55
- && /tmp/cmake-install.sh --skip-license --prefix=/opt/cmake-3.24.1 \
56
- && rm /tmp/cmake-install.sh \
57
- && ln -s /opt/cmake-3.24.1/bin/* /usr/local/bin
58
-
59
- # Install cmake 3.24
60
- #RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.22.1.tar.gz \
61
- # && tar -zvxf cmake-3.24.1.tar.gz \
62
- # && cd cmake-3.24.1 \
63
- # && ./bootstrap \
64
- # && make -j8 \
65
- # && checkinstall --pkgname=cmake --pkgversion="3.20-custom" --default
66
- # Copy contents from 2 levels up
67
- #COPY . ./
68
-
69
- # Download and extract libtorch
70
- #RUN wget https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu118.zip \
71
- # && unzip libtorch-cxx11-abi-shared-with-deps-2.0.1+cu118.zip -d external/
72
-
73
- # Set up a new user named "user" with user ID 1000
74
- RUN useradd -o -u 1000 user
75
-
76
- # Switch to the "user" user
77
- USER user
78
-
79
- ENV PYTHON_BIN /usr/bin/python3
80
-
81
- #ENV PATH /usr/local/cuda-12.2/bin:$PATH
82
- #ENV LD_LIBRARY_PATH /usr/local/cuda-12.2/lib64:$LD_LIBRARY_PATH
83
- # Let's try to downgrade
84
- ENV PATH /usr/local/cuda-11.8/bin:$PATH
85
- ENV LD_LIBRARY_PATH /usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH
86
-
87
-
88
- # Set home to the user's home directory
89
- ENV HOME=/home/user \
90
- PATH=/home/user/.local/bin:$PATH
91
-
92
- # Set the working directory to the user's home directory
93
- WORKDIR $HOME/app
94
-
95
- # Install app dependencies
96
- # A wildcard is used to ensure both package.json AND package-lock.json are copied
97
- # where available (npm@5+)
98
- COPY --chown=user package*.json $HOME/app
99
-
100
- RUN npm install
101
-
102
- # Copy the current directory contents into the container at $HOME/app setting the owner to the user
103
- COPY --chown=user . $HOME/app
104
-
105
- RUN git clone --recursive https://github.com/MrNeRF/gaussian-splatting-cuda
106
-
107
- WORKDIR $HOME/app/gaussian-splatting-cuda
108
-
109
- RUN wget https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu118.zip
110
- RUN unzip libtorch-cxx11-abi-shared-with-deps-2.0.1+cu118.zip -d external/
111
- RUN rm libtorch-cxx11-abi-shared-with-deps-2.0.1+cu118.zip
112
-
113
- # Build (on CPU, this will add compute_35 as build target, which we do not want)
114
- # There seems to be a work around, see this thread:
115
- # https://github.com/MrNeRF/gaussian-splatting-cuda/issues/14
116
- # here is the hack:
117
- #
118
- # Replace "native" by "all"
119
- # inspired by https://github.com/ztxz16/fastllm/pull/309/files
120
- #
121
- # CUDA architectures are defined as codes
122
- # by default CMake detected:
123
- # 3.5;5.0;8.0;8.6;8.9;9.0
124
- # To see the mapping: https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
125
- # A10G and A100 -> Ampere -> sm_80, sm_86, sm_87 -> 8.0;8.6;8.7
126
- # Nvidia T4 -> Turing -> sm_75 -> 7.5
127
- # ? -> Lovelace -> sm_89 -> 8.6
128
- # ? -> Hopper -> sm_90 -> 9.0
129
- RUN find . -name CMakeLists.txt -exec sed -i 's/CUDA_ARCHITECTURES native/CUDA_ARCHITECTURES all/' {} +
130
-
131
- #RUN cmake -B build -D CMAKE_BUILD_TYPE=Release -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.2/ -D CUDA_VERSION=12.2
132
- # Let's try to downgrade the version
133
- RUN cmake -B build -D CMAKE_BUILD_TYPE=Release -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.8/ -D CUDA_VERSION=11.8
134
- RUN cmake --build build -- -j8
135
-
136
- COPY --chown=user . $HOME/app/gaussian-splatting-cuda
137
-
138
- # Set the working directory to the user's home directory
139
- WORKDIR $HOME/app
140
-
141
- RUN echo "Build ended at: $(date "+%Y-%m-%d %H:%M")"
142
-
143
- EXPOSE 7860
144
-
145
- # we can't use this (it time out)
146
- # CMD [ "xvfb-run", "-s", "-ac -screen 0 1920x1080x24", "npm", "run", "start" ]
147
- CMD [ "npm", "run", "start" ]