File size: 986 Bytes
53d72d6
321f5f0
 
53d72d6
 
 
 
321f5f0
 
 
 
 
be076ca
321f5f0
 
 
 
 
 
 
5e58f50
321f5f0
 
be076ca
5e58f50
be076ca
53d72d6
5e58f50
53d72d6
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
# 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