ckc99u commited on
Commit
4c4f4a8
·
verified ·
1 Parent(s): de97381

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -32
Dockerfile CHANGED
@@ -1,44 +1,31 @@
1
  FROM python:3.8-slim
2
 
3
- # Install system dependencies
 
 
4
  RUN apt-get update && apt-get install -y \
5
- wget \
6
- git \
7
- build-essential \
8
- libgl1-mesa-glx \
9
- libglib2.0-0 \
10
- libsm6 \
11
- libxext6 \
12
- libxrender-dev \
13
- && rm -rf /var/lib/apt/lists/*
14
-
15
- # Install binvox for voxelization
16
- RUN wget -O /usr/local/bin/binvox https://www.patrickmin.com/binvox/linux64/binvox?rnd=16820668852988 \
17
- && chmod +x /usr/local/bin/binvox
18
-
19
- # Set working directory
20
  WORKDIR /app
21
 
22
- # Clone RigNet repository
23
- RUN git clone https://github.com/zhan-xu/RigNet.git /app/rignet
 
 
 
 
 
 
 
24
 
25
- # Copy requirements first for better caching
26
  COPY requirements.txt .
27
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
28
 
29
- # Copy application file
30
  COPY app.py .
31
 
32
- # Verify checkpoints directory structure
33
- RUN ls -la Rignet/checkpoints/ || echo "Checkpoints need to be added manually"
34
-
35
- # Expose Gradio port
36
  EXPOSE 7860
37
-
38
- # Set environment variables
39
- ENV GRADIO_SERVER_NAME="0.0.0.0"
40
- ENV GRADIO_SERVER_PORT=7860
41
- ENV PYTHONPATH="Rignet:${PYTHONPATH}"
42
-
43
- # Run the application
44
  CMD ["python", "app.py"]
 
1
  FROM python:3.8-slim
2
 
3
+ ENV PYTHONUNBUFFERED=1
4
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
5
+
6
  RUN apt-get update && apt-get install -y \
7
+ git wget libgl1-mesa-glx libglib2.0-0 unzip && \
8
+ rm -rf /var/lib/apt/lists/*
9
+
 
 
 
 
 
 
 
 
 
 
 
 
10
  WORKDIR /app
11
 
12
+ # Install binvox
13
+ RUN wget -O binvox http://www.patrickmin.com/binvox/linux64/binvox && \
14
+ chmod +x binvox && mv binvox /usr/local/bin/
15
+
16
+ # Clone and setup RigNet
17
+ RUN git clone https://github.com/zhan-xu/RigNet.git rignet && \
18
+ cd rignet/checkpoints && \
19
+ wget 'https://umass-my.sharepoint.com/:u:/g/personal/zhanxu_umass_edu/EQAf8L0-F3BNny7F0wodqbABX3I_TTqJXCIGP1ESdEv-Hg?download=1' -O checkpoints.zip && \
20
+ unzip checkpoints.zip && rm checkpoints.zip
21
 
 
22
  COPY requirements.txt .
23
+ RUN pip install --no-cache-dir torch==1.12.0 torchvision==0.13.0 --index-url https://download.pytorch.org/whl/cpu && \
24
+ pip install --no-cache-dir -f https://data.pyg.org/whl/torch-1.12.0+cpu.html \
25
+ torch_scatter torch_sparse torch_cluster torch_spline_conv && \
26
+ pip install --no-cache-dir -r requirements.txt
27
 
 
28
  COPY app.py .
29
 
 
 
 
 
30
  EXPOSE 7860
 
 
 
 
 
 
 
31
  CMD ["python", "app.py"]