File size: 1,014 Bytes
88457e4
 
354ea9a
88457e4
 
 
 
 
 
 
 
 
354ea9a
88457e4
 
 
 
 
 
 
 
354ea9a
 
 
 
88457e4
 
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
FROM tiangolo/uwsgi-nginx:python3.10

RUN chown -R 1000 /app /etc/nginx /usr/local/lib/python3.10/site-packages /usr/local/bin /var/log /var/run /etc/supervisor/conf.d /run /tmp /etc/uwsgi /var/cache

# 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

# Install Python dependencies and install autoagents
RUN git clone https://github.com/LinkSoul-AI/AutoAgents autoagents && \
    cd autoagents && \
    pip install -r requirements.txt --user && \
    python setup.py install && \
    pip cache purge && \
    cp docker/prestart.sh /app/prestart.sh && \
    cp docker/autoagents.conf /etc/nginx/conf.d/autoagents.conf && \
    sed -i 's/nodaemon=true/nodaemon=true\nuser=user/g' /etc/supervisor/conf.d/supervisord.conf && \
    sed -i 's/nginx/user/g' /etc/uwsgi/uwsgi.ini && \
    sed -i 's/nginx;/user;/g' /etc/nginx/nginx.conf

EXPOSE 7860