Spaces:
Build error
Build error
Update Dockerfile.txt
Browse files- Dockerfile.txt +31 -28
Dockerfile.txt
CHANGED
|
@@ -1,28 +1,31 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
#
|
| 13 |
-
RUN
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
#
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
GROQ_API_KEY = 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
|
| 2 |
+
GOOGLE_API_KEY = AIzaSyDQYGScJvmsLlJjsrbcCzHh1AlhhIWOfP8
|
| 3 |
+
TAVILY_API_KEY = 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
|
| 4 |
+
# use the following image python 3.9
|
| 5 |
+
FROM python:3.9
|
| 6 |
+
# set the working directory to /code
|
| 7 |
+
WORKDIR /code
|
| 8 |
+
|
| 9 |
+
## copy the current directory contents in the container at /code
|
| 10 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 11 |
+
|
| 12 |
+
# install the requirements.txt
|
| 13 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 14 |
+
|
| 15 |
+
#set up a new user named "user"
|
| 16 |
+
RUN useradd user
|
| 17 |
+
# switch to the "user" user
|
| 18 |
+
USER user
|
| 19 |
+
|
| 20 |
+
ENV HOME = /home/user \
|
| 21 |
+
PATH = /home/user/.local/bin:$PATH
|
| 22 |
+
|
| 23 |
+
# set the working directory to the user's home directory
|
| 24 |
+
WORKDIR $HOME/app
|
| 25 |
+
|
| 26 |
+
# copy the current directory contents into the container at $HOME/app setting the owner to
|
| 27 |
+
COPY --chown=user .$HOME/app
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
# start the FASTAPI App on port 7860
|
| 31 |
+
CMD ["uvicorn","app.app","--host","0.0.0.0","--port",7860]
|