File size: 1,086 Bytes
f7fd884
2695082
f7fd884
 
 
 
 
 
 
 
 
 
 
 
a0943bf
6404dfd
 
2169d8b
 
3e890f9
 
 
 
 
 
 
 
 
 
 
8bd9d6a
 
320206c
 
965f867
 
 
 
f7fd884
2695082
f1c1482
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
FROM --platform=amd64 nvcr.io/nvidia/cuda:12.1.0-devel-ubuntu22.04 as base

RUN apt update && \
    apt install -y python3-pip python3-packaging \
    git ninja-build && \
    pip3 install -U pip

# Tweak this list to reduce build time
# https://developer.nvidia.com/cuda-gpus
ENV TORCH_CUDA_ARCH_LIST "7.0;7.2;7.5;8.0;8.6;8.9;9.0"

RUN pip3 install "torch==2.1.1"

# This build is slow but NVIDIA does not provide binaries. Increase MAX_JOBS as needed.
# RUN pip3 install "git+https://github.com/stanford-futuredata/megablocks.git"
RUN pip3 install -U openai
RUN pip3 install -U vllm
RUN pip3 install -U pydantic

# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user

# Switch to the "user" user
USER user

# Set home to the user's home directory
ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

# Set the working directory to the user's home directory
WORKDIR $HOME/app

COPY --chown=user . $HOME/app

COPY --chown=user entrypoint.sh $HOME/app/

RUN ls -la $HOME/app/

RUN chmod +x $HOME/app/entrypoint.sh

ENTRYPOINT ["/home/user/app/entrypoint.sh"]