Deburing-Motion2 / Dockerfile
SoDa12321's picture
Update Dockerfile
51de5ab verified
# Use the Ubuntu 20.04 image as a parent image
FROM ubuntu:20.04
# Set the working directory
WORKDIR /app
# Update package lists and install git, python3, and pip3
RUN apt-get update && apt-get install -y git python3 python3-dev python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/*
# Clone the repository
RUN git clone https://github.com/ankitVP77/Blind-Motion-Deblurring-for-Legible-License-Plates-using-Deep-Learning.git /app
# Install scikit-build before other dependencies to resolve opencv-python-headless installation issue
RUN pip3 install --no-cache-dir scikit-build
# Set MPLCONFIGDIR environment variable to a writable directory
ENV MPLCONFIGDIR=/tmp/.config/matplotlib
# Install Python dependencies with specific versions
RUN pip3 install --no-cache-dir \
tensorflow==2.13.1 \
numpy==1.24.3 \
opencv-python-headless \
matplotlib \
typing-extensions==4.6.0 \
gradio==3.0.12 \
python-dotenv>=0.13
# Expose the port the app runs on
EXPOSE 7860
# Copy the current directory contents into the container
COPY . /app
# Run the app.py script
CMD ["python3", "app.py"]