cxeep commited on
Commit
d9472e5
·
verified ·
1 Parent(s): b41f352

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -0
Dockerfile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Ubuntu base image
2
+ FROM ubuntu:latest
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && \
6
+ apt-get install -y libopencv-dev git cmake build-essential && \
7
+ rm -rf /var/lib/apt/lists/*
8
+
9
+ # Clone the GitHub repository
10
+ RUN git clone https://github.com/Truoji/tengine-lite-yolov5s-tt100k.git
11
+
12
+ # Set the working directory to the cloned repository
13
+ WORKDIR /tengine-lite-yolov5s-tt100k
14
+
15
+ # Build the project
16
+ RUN mkdir build && \
17
+ cd build && \
18
+ cmake .. && \
19
+ make
20
+
21
+ # Set environment variables
22
+ ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/tengine-lite-yolov5s-tt100k/third_party/"
23
+
24
+ # Install Python and pip
25
+ RUN apt-get update && \
26
+ apt-get install -y python3 python3-pip && \
27
+ rm -rf /var/lib/apt/lists/*
28
+
29
+ # Install Gradio
30
+ RUN pip3 install gradio
31
+
32
+ # Copy the gradio.app.py script into the container
33
+ COPY gradio.app.py /tengine-lite-yolov5s-tt100k/gradio.app.py
34
+
35
+ # Expose the port on which the web app will run
36
+ EXPOSE 7860
37
+
38
+ # Run gradio.app.py when the container launches
39
+ CMD ["python3", "gradio.app.py"]