Spaces:
Sleeping
Sleeping
File size: 944 Bytes
c3268d4 95da2ca c3268d4 f13a5e5 95da2ca c3268d4 95da2ca c3268d4 f13a5e5 c3268d4 95da2ca c3268d4 |
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 |
# Use Python 3.11 as the base image
FROM docker.io/library/python:3.11@sha256:6e9f67fa63b0323fc96f8a991bd7c6382f05031c24a7e9601777c513c6cdec3f
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
cmake \
rsync \
libgl1-mesa-glx \
curl \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /home/user/app
# Create and set user
RUN useradd -m -u 1000 user && chown 1000:1000 /home/user/app
# Install Node.js (optional, remove if not needed)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY --chown=1000:1000 requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
# Copy application code
COPY --chown=1000:1000 . .
# Command to run the app
CMD ["python", "app.py"] |