Spaces:
Runtime error
Runtime error
File size: 1,018 Bytes
4607d95 f5f3936 bf103bf f5f3936 bf103bf b9fb924 bf103bf f5f3936 bf103bf 4607d95 bf103bf 9820c02 bf103bf 602c04e bf103bf f5f3936 a24715a 3dfc91d f5f3936 eb0aef1 9506fa0 4607d95 d1c15a7 4607d95 7b813cc 1647002 d86c7bd |
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 |
# Stage 1: Base Python image
FROM python:3.9 as base
# Create a user and set environment variables
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
COPY --chown=user . $HOME/app
# Set working directory
WORKDIR /app
# Copy Python dependencies and install them
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir scikit-build
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
ENV DEBIAN_FRONTEND=noninteractive
USER root
RUN apt-get update && apt-get clean
RUN apt-get update && apt-get install -y --fix-missing \
python3-opencv \
python3-pip \
ca-certificates \
python3-dev \
git \
wget \
sudo \
ninja-build
RUN pip install --no-cache-dir scikit-build
# RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN pip install --no-cache-dir tensorboard cmake onnx
USER user
ENV HOME=/home/user
COPY --chown=user . $HOME/app
WORKDIR $HOME/app
RUN ls -a
CMD ["python", "app.py"]
|