Spaces:
Running
Running
Create Dockerfile
Browse files- Dockerfile +25 -0
Dockerfile
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
4 |
+
|
5 |
+
# Set up a new user named "user" with user ID 1000
|
6 |
+
RUN useradd -m -u 1000 user
|
7 |
+
|
8 |
+
# Switch to the "user" user
|
9 |
+
USER 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 && \
|
17 |
+
cd autoagents && \
|
18 |
+
pip install -r requirements.txt --user && \
|
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
|