| FROM python:3.9-slim | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /usr/src/app | |
| # Copy the files | |
| RUN echo Copying files | |
| COPY app.py . | |
| COPY lambdas.py . | |
| COPY requirements.txt . | |
| COPY descriptions.py . | |
| # Installations | |
| RUN apt-get update && apt-get install libzbar0 -y && pip install pyzbar | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| RUN pip install --no-cache-dir gradio | |
| # Expose | |
| EXPOSE 7860 | |
| ENV GRADIO_SERVER_NAME="0.0.0.0" | |
| # Run the app | |
| CMD ["python", "app.py"] |