Spaces:
Sleeping
Sleeping
File size: 1,883 Bytes
035df8d e85ab2c 3c9c655 035df8d 46faf7d 89b7fb7 46faf7d 01aee65 3780a00 3c9c655 46faf7d f5c4dff 3c9c655 4af0100 14f943f cf95753 14f943f 0dd3195 14f943f 1bc5de5 14f943f 3c9c655 14f943f 7f81961 14f943f ff5da18 ebf4ad9 d57d9e6 ebf4ad9 14f943f 3c9c655 14f943f 3c9c655 14f943f |
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 |
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
CMD nvidia-smi
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
git \
make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -ms /bin/bash user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
RUN curl https://pyenv.run | bash
ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
RUN pyenv install 3.8.15 && \
pyenv global 3.8.15 && \
pyenv rehash && \
pip install --no-cache-dir --upgrade pip setuptools wheel
ENV WORKDIR=/code
WORKDIR $WORKDIR
RUN chown -R user:user $WORKDIR
RUN chmod -R 777 $WORKDIR
COPY requirements.txt $WORKDIR/requirements.txt
COPY . .
RUN pip install --no-cache-dir --upgrade -r $WORKDIR/requirements.txt
ARG TORCH_CUDA_ARCH_LIST=7.5+PTX
RUN pip install ninja
USER root
RUN chown -R user:user /usr
RUN chmod -R 777 /usr
RUN chown -R user:user $HOME
RUN chmod -R 777 $HOME
RUN chown -R user:user $WORKDIR
RUN chmod -R 777 $WORKDIR
USER user
RUN ln -s $WORKDIR/oneformer/modeling/pixel_decoder/ops/ $WORKDIR/ && ls && cd ops/ && FORCE_CUDA=1 python setup.py build --build-base=$WORKDIR/ install --user && cd ..
RUN sh deform_setup.sh
USER user
RUN sh deform_setup.sh
RUN mkdir -p examples
RUN wget https://github.com/SHI-Labs/OneFormer-Colab/blob/master/samples/ade20k.jpeg -P $WORKDIR/examples/
RUN wget https://github.com/SHI-Labs/OneFormer-Colab/blob/master/samples/cityscapes.png -P $WORKDIR/examples/
RUN wget https://github.com/SHI-Labs/OneFormer-Colab/blob/master/samples/coco.jpeg -P $WORKDIR/examples/
USER user
EXPOSE 7860
ENTRYPOINT ["python", "gradio_app.py"]
|