Create Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556# Use the specified Python runtime as a parent imageFROM docker.io/library/python:3.10.13@sha256:d5b1fbbc00fd3b55620a9314222498bebf09c4bf606425bf464709ed6a79f202
# Set the working directory in the containerWORKDIR /usr/src/app
# Install required packagesRUN 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/*
# Install Node.js and npmRUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \ && apt-get install -y nodejs
# Set environment variable to use gcc-11ENV CC=/usr/bin/gcc-11
# Copy the current directory contents into the containerCOPY . .
# Install any needed packages specified in requirements.txtRUN pip install --no-cache-dir -r requirements.txt
# Set the working directory for the GroundingDINO opsWORKDIR /usr/src/app/models/GroundingDINO/ops
# Run the setup script and the test scriptRUN python setup.py build installRUN python test.py # This should result in 6 lines of * True
# Install GradioRUN pip install gradio
# Clone the custom Gradio component repository and build itWORKDIR /usr/src/appRUN git clone https://github.com/niki-amini-naieni/gradio-image-prompter-visible-boxes.git \ && cd gradio-image-prompter-visible-boxes \ && npm install \ && npm run build
# Change back to the original working directoryWORKDIR /usr/src/app
# Expose the port Gradio will run onEXPOSE 7860
# Default command to run the Gradio appCMD ["python", "app.py"]DockerfileAdded+56