Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10
|
2 |
+
|
3 |
+
RUN useradd -m -u 1000 user
|
4 |
+
|
5 |
+
ENV HOME=/home/user
|
6 |
+
ENV PATH=/home/user/.local/bin:$PATH
|
7 |
+
|
8 |
+
USER user
|
9 |
+
|
10 |
+
WORKDIR $HOME/app
|
11 |
+
|
12 |
+
RUN pip install --no-cache-dir google-generativeai
|
13 |
+
RUN pip install --no-cache-dir requests
|
14 |
+
RUN pip install --no-cache-dir fastapi
|
15 |
+
RUN pip install --no-cache-dir uvicorn
|
16 |
+
|
17 |
+
RUN --mount=type=secret,id=URL,mode=0444,required=true \
|
18 |
+
|
19 |
+
git clone $(cat /run/secrets/URL) .
|
20 |
+
|
21 |
+
COPY --chown=user . $HOME/app
|
22 |
+
|
23 |
+
CMD ["python", "main.py"]
|