OCR / Dockerfile
DeepDiveDev's picture
Update Dockerfile
53d72d6 verified
raw
history blame contribute delete
986 Bytes
# Use the official Python image
FROM docker.io/library/python:3.10@sha256:aaacc373f21abcbc67a22d203dab7fb797c016cc4c1daa7d2dec359dcbf4aea1
# Set the working directory
WORKDIR /home/user/app
# Install necessary system packages
RUN apt-get update && apt-get install -y \
git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1-mesa-glx \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# Create a non-root user
RUN apt-get update && apt-get install -y fakeroot \
&& mv /usr/bin/apt-get /usr/bin/.apt-get \
&& echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get \
&& chmod +x /usr/bin/apt-get \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m -u 1000 user
# Upgrade pip to the latest version
RUN pip install --no-cache-dir --upgrade pip
# Copy requirements.txt to the container
COPY requirements.txt /tmp/requirements.txt
# Install Python packages from requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt