CoolFace
Apppublic

SteelAwsm/testgrad

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Dockerfile45 linesDownload Raw Back to root
1# Use a base image with Python 3.102FROM python:3.103 4# Set the working directory5WORKDIR /home/user/app6 7# Install system dependencies8RUN apt-get update && apt-get install -y \9    git \10    git-lfs \11    ffmpeg \12    libsm6 \13    libxext6 \14    cmake \15    rsync \16    libgl1-mesa-glx && \17    rm -rf /var/lib/apt/lists/* && \18    git lfs install19 20# Install fakeroot (this part is usually required by Hugging Face)21RUN apt-get update && apt-get install -y fakeroot && \22    mv /usr/bin/apt-get /usr/bin/.apt-get && \23    echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get && \24    chmod +x /usr/bin/apt-get && \25    rm -rf /var/lib/apt/lists/* && \26    useradd -m -u 1000 user27 28# Install Python dependencies29COPY requirements.txt /tmp/requirements.txt30RUN pip install --no-cache-dir -r /tmp/requirements.txt31 32# Clone YOLOv7 manually and set the PYTHONPATH33RUN git clone https://github.com/WongKinYiu/yolov7 /yolov7 && \34    pip install --no-cache-dir -r /yolov7/requirements.txt && \35    export PYTHONPATH="$PYTHONPATH:/yolov7"36 37# Copy the rest of the application code38COPY . .39 40# Expose the port that Gradio will run on41EXPOSE 786042 43# Command to run the app44CMD ["python", "app.py"]45