File size: 1,181 Bytes
d111f0e
9be2c90
d111f0e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Use the specified Python runtime as a parent image
FROM docker.io/nvidia/cuda:12.1.0-cudnn8-devel-ubi8@sha256:f045009cab64c9fda6113b4473ac1c57dfcca65e18ce981bce63f3cddf7b807a

# Set the working directory in the container
WORKDIR /usr/src/app

# Install required packages
RUN apt-get update && apt-get install -y \
    gcc-11 \
    build-essential \
    ffmpeg \
    libsm6 \
    libxext6 \
    curl \
    git \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# Set environment variable to use gcc-11
ENV CC=/usr/bin/gcc-11

# Copy the current directory contents into the container
COPY . .

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Set the working directory for the GroundingDINO ops
WORKDIR /usr/src/app/models/GroundingDINO/ops

# Run the setup script and the test script
RUN python setup.py build install
RUN python test.py # This should result in 6 lines of * True

# Install Gradio
RUN pip install gradio

# Change back to the original working directory
WORKDIR /usr/src/app

# Expose the port Gradio will run on
EXPOSE 7860

# Default command to run the Gradio app
CMD ["python", "app.py"]