|
|
|
FROM nvidia/cuda:11.8-devel-ubuntu20.04 |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
ENV PYTHONUNBUFFERED=1 |
|
ENV CUDA_HOME=/usr/local/cuda |
|
ENV PATH=${CUDA_HOME}/bin:${PATH} |
|
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
python3.8 \ |
|
python3.8-dev \ |
|
python3-pip \ |
|
git \ |
|
wget \ |
|
curl \ |
|
build-essential \ |
|
cmake \ |
|
ninja-build \ |
|
libgl1-mesa-glx \ |
|
libglib2.0-0 \ |
|
libsm6 \ |
|
libxext6 \ |
|
libxrender-dev \ |
|
libgomp1 \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN ln -s /usr/bin/python3.8 /usr/bin/python |
|
|
|
|
|
RUN python -m pip install --upgrade pip |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
RUN pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu118 |
|
|
|
|
|
RUN pip install -r requirements.txt |
|
|
|
|
|
RUN pip install git+https://github.com/openai/CLIP.git |
|
|
|
|
|
RUN mkdir -p packages |
|
|
|
|
|
WORKDIR /app/packages |
|
RUN git clone https://github.com/NVlabs/nvdiffrast.git && \ |
|
cd nvdiffrast && \ |
|
pip install . |
|
|
|
|
|
WORKDIR /app/packages |
|
RUN git clone https://github.com/facebookresearch/pytorch3d.git && \ |
|
cd pytorch3d && \ |
|
pip install . |
|
|
|
|
|
WORKDIR /app/packages |
|
RUN git clone https://github.com/patrickjohncyh/fashion-clip.git && \ |
|
cd fashion-clip && \ |
|
pip install appdirs boto3 annoy validators transformers datasets |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY . . |
|
|
|
|
|
RUN mkdir -p outputs meshes meshes_target |
|
|
|
|
|
RUN chmod +x setup_spaces.py |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["python", "app.py"] |