File size: 940 Bytes
5b2dde1
38293b0
f15a1cd
 
 
 
5b2797c
 
 
d89efd0
 
 
473c15c
 
f43bdbf
 
 
5b2797c
473c15c
 
 
f15a1cd
c64deb3
f15a1cd
04ea559
c64deb3
473c15c
d89efd0
473c15c
 
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
# This file may not be used if using the gradio SDK.
FROM nvcr.io/nvidia/pytorch:23.08-py3

LABEL maintainer="yuanze"
LABEL email="[email protected]"

# Install webp support
RUN apt update && apt install libwebp-dev -y

RUN useradd -m -u 1000 user
USER user

WORKDIR /code

# According to https://huggingface.co./docs/hub/spaces-sdks-docker#permissions, the container will run with the user id 1000
RUN chown -R user:user /code

COPY --chown=user:user ./requirements.txt /code/requirements.txt

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# note that you may need to modify the TORCH_CUDA_ARCH_LIST in the setup.py file
# ENV TORCH_CUDA_ARCH_LIST="8.6"

# Install Pointnet2_PyTorch, pip install git+ won't work for unknown reason
# RUN git clone https://github.com/yuanze1024/Pointnet2_PyTorch.git && cd Pointnet2_PyTorch/pointnet2_ops_lib && pip install .

COPY --chown=user:user . /code

CMD ["python", "app.py"]