# This file may not be used if using the gradio SDK. FROM nvcr.io/nvidia/pytorch:23.08-py3 LABEL maintainer="yuanze" LABEL email="yuanze1024@gmail.com" # 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"]