Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
FROM tiangolo/uwsgi-nginx:python3.10
|
2 |
|
3 |
-
RUN chown -R 1000 /app /etc/nginx /usr/local/lib/python3.10/site-packages /usr/local/bin /var/log /var/run
|
4 |
|
5 |
# Set up a new user named "user" with user ID 1000
|
6 |
RUN useradd -m -u 1000 user
|
@@ -10,7 +10,7 @@ USER user
|
|
10 |
|
11 |
# Set home to the user's home directory
|
12 |
ENV HOME=/home/user \
|
13 |
-
|
14 |
|
15 |
# Install Python dependencies and install autoagents
|
16 |
RUN git clone https://github.com/LinkSoul-AI/AutoAgents autoagents && \
|
@@ -19,7 +19,9 @@ RUN git clone https://github.com/LinkSoul-AI/AutoAgents autoagents && \
|
|
19 |
python setup.py install && \
|
20 |
pip cache purge && \
|
21 |
cp docker/prestart.sh /app/prestart.sh && \
|
22 |
-
cp docker/autoagents.conf /etc/nginx/conf.d/autoagents.conf
|
|
|
|
|
|
|
23 |
|
24 |
-
USER root
|
25 |
EXPOSE 7860
|
|
|
1 |
FROM tiangolo/uwsgi-nginx:python3.10
|
2 |
|
3 |
+
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
|
4 |
|
5 |
# Set up a new user named "user" with user ID 1000
|
6 |
RUN useradd -m -u 1000 user
|
|
|
10 |
|
11 |
# Set home to the user's home directory
|
12 |
ENV HOME=/home/user \
|
13 |
+
PATH=/home/user/.local/bin:$PATH
|
14 |
|
15 |
# Install Python dependencies and install autoagents
|
16 |
RUN git clone https://github.com/LinkSoul-AI/AutoAgents autoagents && \
|
|
|
19 |
python setup.py install && \
|
20 |
pip cache purge && \
|
21 |
cp docker/prestart.sh /app/prestart.sh && \
|
22 |
+
cp docker/autoagents.conf /etc/nginx/conf.d/autoagents.conf && \
|
23 |
+
sed -i 's/nodaemon=true/nodaemon=true\nuser=user/g' /etc/supervisor/conf.d/supervisord.conf && \
|
24 |
+
sed -i 's/nginx/user/g' /etc/uwsgi/uwsgi.ini && \
|
25 |
+
sed -i 's/nginx;/user;/g' /etc/nginx/nginx.conf
|
26 |
|
|
|
27 |
EXPOSE 7860
|