File size: 744 Bytes
4da6669
a71f6b1
1acf3b6
a71f6b1
 
1acf3b6
 
 
 
 
 
 
a71f6b1
 
1acf3b6
a71f6b1
 
 
1acf3b6
a71f6b1
 
1acf3b6
 
a71f6b1
 
 
 
 
1acf3b6
a71f6b1
1acf3b6
 
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
FROM python:3.9

# Create user first
RUN useradd -m -u 1000 aim_user

# Perform root operations: Install packages, copy system configs
RUN apt-get update && apt-get install -y nginx procps && rm -rf /var/lib/apt/lists/*
COPY nginx.conf /etc/nginx/nginx.conf
COPY start.sh /start.sh
RUN chmod +x /start.sh

# Now switch to the final user
USER aim_user

# Set home and path
ENV HOME=/home/aim_user \
	PATH=/home/aim_user/.local/bin:$PATH

# Set the working directory
WORKDIR $HOME

# install aim (as aim_user)
RUN pip install aim --no-cache-dir

ENTRYPOINT ["/bin/sh", "-c"]

COPY aim_repo.tar.gz .
RUN tar xvzf aim_repo.tar.gz
# Port 43800 for UI, 53800 for Server. Nginx listens on 7860.

# Run the startup script as aim_user
CMD ["/start.sh"]