Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +11 -11
Dockerfile
CHANGED
@@ -15,12 +15,10 @@ RUN apt-get update \
|
|
15 |
FROM python:3.11-slim-bullseye
|
16 |
COPY --from=builder /*.deb /
|
17 |
WORKDIR /app
|
18 |
-
RUN echo "deb http://deb.debian.org/debian/ unstable main contrib non-free" >> /etc/apt/sources.list
|
19 |
RUN apt update
|
20 |
-
RUN apt install -y python3 python3-pip libgl1-mesa-glx wget libglib2.0-dev
|
21 |
-
RUN pip install playwright
|
22 |
-
RUN playwright install firefox --with-deps
|
23 |
-
|
24 |
RUN dpkg -i /libgl1-mesa-dri.deb \
|
25 |
&& dpkg -i /adwaita-icon-theme.deb \
|
26 |
# Install dependencies
|
@@ -35,13 +33,15 @@ RUN dpkg -i /libgl1-mesa-dri.deb \
|
|
35 |
&& chown -R foxer:foxer .
|
36 |
|
37 |
RUN rm -rf /root/.cache
|
38 |
-
|
|
|
39 |
|
40 |
-
|
|
|
41 |
|
42 |
-
COPY
|
43 |
-
|
|
|
44 |
|
45 |
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
46 |
-
CMD ["/usr/local/bin/python","-u",
|
47 |
-
|
|
|
15 |
FROM python:3.11-slim-bullseye
|
16 |
COPY --from=builder /*.deb /
|
17 |
WORKDIR /app
|
18 |
+
#RUN echo "deb http://deb.debian.org/debian/ unstable main contrib non-free" >> /etc/apt/sources.list
|
19 |
RUN apt update
|
20 |
+
RUN apt install -y python3 python3-pip libgl1-mesa-glx wget libglib2.0-dev sudo libpci-dev psmisc
|
21 |
+
RUN pip install -U playwright requests loguru flask Flask-Limiter open_clip torch
|
|
|
|
|
22 |
RUN dpkg -i /libgl1-mesa-dri.deb \
|
23 |
&& dpkg -i /adwaita-icon-theme.deb \
|
24 |
# Install dependencies
|
|
|
33 |
&& chown -R foxer:foxer .
|
34 |
|
35 |
RUN rm -rf /root/.cache
|
36 |
+
RUN chmod 777 -R "/usr/local/lib/python3.11/"
|
37 |
+
RUN chmod 777 -R "/app/"
|
38 |
|
39 |
+
USER foxer
|
40 |
+
COPY model_peocess.py .
|
41 |
|
42 |
+
COPY api.py .
|
43 |
+
COPY token .
|
44 |
+
EXPOSE 8081
|
45 |
|
46 |
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
47 |
+
CMD ["/usr/local/bin/python","-u","/app/api.py"]
|
|