Spaces:
Paused
Paused
Delete Dockerfile
Browse files- Dockerfile +0 -103
Dockerfile
DELETED
|
@@ -1,103 +0,0 @@
|
|
| 1 |
-
# Use CUDA base image compatible with L4 GPU
|
| 2 |
-
FROM nvidia/cuda:12.1-devel-ubuntu22.04
|
| 3 |
-
|
| 4 |
-
# Set environment variables
|
| 5 |
-
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
-
ENV PYTHONUNBUFFERED=1
|
| 7 |
-
ENV CUDA_HOME=/usr/local/cuda
|
| 8 |
-
ENV PATH=${CUDA_HOME}/bin:${PATH}
|
| 9 |
-
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
| 10 |
-
|
| 11 |
-
# Install system dependencies
|
| 12 |
-
RUN apt-get update && apt-get install -y \
|
| 13 |
-
python3.10 \
|
| 14 |
-
python3.10-dev \
|
| 15 |
-
python3-pip \
|
| 16 |
-
git \
|
| 17 |
-
wget \
|
| 18 |
-
curl \
|
| 19 |
-
build-essential \
|
| 20 |
-
cmake \
|
| 21 |
-
ninja-build \
|
| 22 |
-
libgl1-mesa-glx \
|
| 23 |
-
libglib2.0-0 \
|
| 24 |
-
libsm6 \
|
| 25 |
-
libxext6 \
|
| 26 |
-
libxrender-dev \
|
| 27 |
-
libgomp1 \
|
| 28 |
-
libssl-dev \
|
| 29 |
-
zlib1g-dev \
|
| 30 |
-
libbz2-dev \
|
| 31 |
-
libreadline-dev \
|
| 32 |
-
libsqlite3-dev \
|
| 33 |
-
libncursesw5-dev \
|
| 34 |
-
xz-utils \
|
| 35 |
-
tk-dev \
|
| 36 |
-
libxml2-dev \
|
| 37 |
-
libxmlsec1-dev \
|
| 38 |
-
libffi-dev \
|
| 39 |
-
liblzma-dev \
|
| 40 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 41 |
-
|
| 42 |
-
# Create symbolic link for python
|
| 43 |
-
RUN ln -s /usr/bin/python3.10 /usr/bin/python
|
| 44 |
-
|
| 45 |
-
# Upgrade pip
|
| 46 |
-
RUN python -m pip install --upgrade pip
|
| 47 |
-
|
| 48 |
-
# Set working directory
|
| 49 |
-
WORKDIR /app
|
| 50 |
-
|
| 51 |
-
# Copy requirements first for better caching
|
| 52 |
-
COPY requirements.txt .
|
| 53 |
-
|
| 54 |
-
# Install PyTorch with CUDA 12.1 support FIRST
|
| 55 |
-
RUN pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu121
|
| 56 |
-
|
| 57 |
-
# Install torch-sparse and torch-scatter with correct CUDA version
|
| 58 |
-
RUN pip install torch-sparse torch-scatter -f https://data.pyg.org/whl/torch-2.2.2+cu121.html
|
| 59 |
-
|
| 60 |
-
# Install basic dependencies
|
| 61 |
-
RUN pip install -r requirements.txt
|
| 62 |
-
|
| 63 |
-
# Install CLIP
|
| 64 |
-
RUN pip install git+https://github.com/openai/CLIP.git
|
| 65 |
-
|
| 66 |
-
# Create packages directory
|
| 67 |
-
RUN mkdir -p packages
|
| 68 |
-
|
| 69 |
-
# Install nvdiffrast
|
| 70 |
-
WORKDIR /app/packages
|
| 71 |
-
RUN git clone https://github.com/NVlabs/nvdiffrast.git && \
|
| 72 |
-
cd nvdiffrast && \
|
| 73 |
-
pip install .
|
| 74 |
-
|
| 75 |
-
# Install PyTorch3D with CUDA support
|
| 76 |
-
WORKDIR /app/packages
|
| 77 |
-
RUN git clone https://github.com/facebookresearch/pytorch3d.git && \
|
| 78 |
-
cd pytorch3d && \
|
| 79 |
-
FORCE_CUDA=1 pip install .
|
| 80 |
-
|
| 81 |
-
# Install Fashion-CLIP
|
| 82 |
-
WORKDIR /app/packages
|
| 83 |
-
RUN git clone https://github.com/patrickjohncyh/fashion-clip.git && \
|
| 84 |
-
cd fashion-clip && \
|
| 85 |
-
pip install appdirs boto3 annoy validators transformers datasets
|
| 86 |
-
|
| 87 |
-
# Return to app directory
|
| 88 |
-
WORKDIR /app
|
| 89 |
-
|
| 90 |
-
# Copy application files
|
| 91 |
-
COPY . .
|
| 92 |
-
|
| 93 |
-
# Create necessary directories
|
| 94 |
-
RUN mkdir -p outputs meshes meshes_target
|
| 95 |
-
|
| 96 |
-
# Make setup script executable
|
| 97 |
-
RUN chmod +x setup_spaces.py
|
| 98 |
-
|
| 99 |
-
# Expose port
|
| 100 |
-
EXPOSE 7860
|
| 101 |
-
|
| 102 |
-
# Set the default command
|
| 103 |
-
CMD ["python", "app.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|