Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +10 -13
Dockerfile
CHANGED
@@ -1,5 +1,14 @@
|
|
1 |
FROM python:3.12-slim
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /app
|
4 |
|
5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
@@ -31,20 +40,8 @@ RUN pip install --no-cache-dir gradio mcp openai -U
|
|
31 |
|
32 |
RUN python -m playwright install --with-deps chromium
|
33 |
|
34 |
-
RUN git clone https://github.com/modelscope/mcp-central.git
|
35 |
|
36 |
WORKDIR /app/mcp-central/examples/lite_research
|
37 |
|
38 |
-
RUN --mount=type=secret,id=MODEL_TOKEN,mode=0444,required=true \
|
39 |
-
export MODEL_TOKEN=$(cat /run/secrets/MODEL_TOKEN)
|
40 |
-
|
41 |
-
ENV MODEL_TOKEN=${MODEL_TOKEN}
|
42 |
-
|
43 |
-
RUN echo ${MODEL_TOKEN}
|
44 |
-
|
45 |
-
RUN --mount=type=secret,id=TAVILY_API_KEY,mode=0444,required=true \
|
46 |
-
export TAVILY_API_KEY=$(cat /run/secrets/TAVILY_API_KEY)
|
47 |
-
|
48 |
-
ENV TAVILY_API_KEY=${TAVILY_API_KEY}
|
49 |
-
|
50 |
CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.12-slim
|
2 |
|
3 |
+
RUN useradd -m -u 1000 user
|
4 |
+
|
5 |
+
# Switch to the "user" user
|
6 |
+
USER user
|
7 |
+
|
8 |
+
# Set home to the user's home directory
|
9 |
+
ENV HOME=/home/user \
|
10 |
+
PATH=/home/user/.local/bin:$PATH
|
11 |
+
|
12 |
WORKDIR /app
|
13 |
|
14 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
40 |
|
41 |
RUN python -m playwright install --with-deps chromium
|
42 |
|
43 |
+
RUN --chown=user git clone https://github.com/modelscope/mcp-central.git
|
44 |
|
45 |
WORKDIR /app/mcp-central/examples/lite_research
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|