fffiloni commited on
Commit
71bd830
·
1 Parent(s): 2ab927e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +50 -0
Dockerfile ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+
5
+ RUN apt-get update && apt-get install -y git libgl1-mesa-glx libglib2.0-0
6
+
7
+ RUN apt-get update && apt-get install -y unzip ffmpeg build-essential aria2
8
+
9
+ RUN useradd -m -u 1000 user
10
+
11
+ USER user
12
+
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH \
15
+ PYTHONPATH=$HOME/app \
16
+ PYTHONUNBUFFERED=1 \
17
+ GRADIO_ALLOW_FLAGGING=never \
18
+ GRADIO_NUM_PORTS=1 \
19
+ GRADIO_SERVER_NAME=0.0.0.0 \
20
+ GRADIO_THEME=huggingface \
21
+ GRADIO_SHARE=False \
22
+ SYSTEM=spaces
23
+
24
+ # Set the working directory to the user's home directory
25
+ WORKDIR $HOME/app
26
+
27
+
28
+ # Clone your repository or add your code to the container
29
+ RUN git clone https://github.com/Flode-Labs/vid2densepose.git $HOME/app
30
+
31
+ # Change to the cloned repository directory
32
+ WORKDIR $HOME/app/vid2densepose
33
+
34
+ # Install dependencies
35
+ RUN pip install --no-cache-dir -r requirements.txt gradio
36
+
37
+ RUN git clone https://github.com/facebookresearch/detectron2.git
38
+
39
+ # Create a directory in the container using the environment variable
40
+ RUN mkdir -p $HOME/app/hf-examples
41
+
42
+
43
+ RUN find $HOME/app
44
+
45
+ # Set the environment variable to specify the GPU device
46
+ ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
47
+ ENV CUDA_VISIBLE_DEVICES=0
48
+
49
+ # Run your app.py script
50
+ CMD ["python", "app.py"]