File size: 1,225 Bytes
773fa99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Use the NVIDIA CUDA image as the base
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04

# Set the working directory
WORKDIR /home/user/app

# Install required system dependencies
RUN apt-get update && apt-get install -y \
    git rsync \
    make build-essential libssl-dev zlib1g-dev \
    libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
    libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
    git-lfs ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
    && rm -rf /var/lib/apt/lists/* \
    && git lfs install

# Install Python and pip
RUN curl https://pyenv.run | bash

# Set up pyenv environment
ENV PATH="/root/.pyenv/shims:/root/.pyenv/bin:/root/.pyenv/versions/3.9.6/bin:${PATH}"
RUN pyenv install 3.9.6 && pyenv global 3.9.6

# Copy the requirements.txt file
COPY requirements.txt /tmp/requirements.txt

# Install Python packages
RUN --mount=type=cache,target=/root/.cache/pip \
    pip install --upgrade pip && \
    pip install --no-cache-dir -r /tmp/requirements.txt

# Copy application files
COPY . /home/user/app

# Copy the entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Set the entrypoint script
ENTRYPOINT ["/entrypoint.sh"]