Spaces:
Paused
Paused
alessandro trinca tornidor
commited on
Commit
·
1645b56
1
Parent(s):
c5fe4a2
[ci] change Dockerfile base image
Browse files- Dockerfile +14 -54
Dockerfile
CHANGED
@@ -1,61 +1,21 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
|
|
|
|
|
|
|
4 |
|
5 |
-
|
6 |
-
|
|
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
ENV XDG_CACHE_HOME=/data
|
12 |
|
13 |
-
|
14 |
-
COPY . ${WORKDIR}/
|
15 |
-
RUN ls ${WORKDIR}/
|
16 |
-
RUN mkdir -p ${XDG_CACHE_HOME}/.cache
|
17 |
-
RUN chmod 770 ${XDG_CACHE_HOME}/.cache
|
18 |
-
|
19 |
-
RUN apt update && apt upgrade -y && apt install --no-install-recommends -y \
|
20 |
-
build-essential \
|
21 |
-
python3.11 \
|
22 |
-
python3-pip \
|
23 |
-
python3-dev \
|
24 |
-
python3-venv \
|
25 |
-
git \
|
26 |
-
ffmpeg \
|
27 |
-
curl \
|
28 |
-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
29 |
-
|
30 |
-
RUN which python3
|
31 |
-
RUN python3 --version
|
32 |
-
RUN python3 -m venv venv
|
33 |
-
RUN source ${WORKDIR}/venv/bin/activate python -m pip install pip --upgrade && python -m pip install -r ${WORKDIR}/requirements.txt
|
34 |
-
RUN source ${WORKDIR}/venv/bin/activate && which python && python --version
|
35 |
-
RUN chmod +x ${WORKDIR}/scripts/entrypoint.sh
|
36 |
-
RUN curl -o /tmp/frpc_linux_amd64_v0.2 https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64
|
37 |
-
RUN ls -l /tmp/frpc_linux_amd64_v0.2
|
38 |
-
RUN cp /tmp/frpc_linux_amd64_v0.2 ${WORKDIR}/venv/lib/python*/site-packages/gradio
|
39 |
-
RUN ls -l ${WORKDIR}/venv/lib/python*/site-packages/gradio
|
40 |
-
RUN ls -l ${WORKDIR}/venv/bin
|
41 |
-
RUN bash --version
|
42 |
-
RUN chmod 770 ${WORKDIR}/flagged/
|
43 |
-
RUN chmod 770 ${WORKDIR}/flagged/* || true
|
44 |
-
RUN ls -ld ${WORKDIR}/flagged/
|
45 |
-
RUN ls -ld ${WORKDIR}/flagged/* || echo "folders ${WORKDIR}/flagged/* not found"
|
46 |
-
RUN ls -l ${WORKDIR}
|
47 |
-
RUN ls -l ${WORKDIR}/scripts/
|
48 |
-
RUN ls -l ${WORKDIR}/scripts/entrypoint.sh
|
49 |
|
50 |
EXPOSE 7860
|
51 |
|
52 |
-
CMD ["/
|
53 |
-
# CMD [
|
54 |
-
# "/var/task/scripts/entrypoint.sh",
|
55 |
-
# "/var/task/venv/bin/uvicorn", "app:lisa_app",
|
56 |
-
# "--host", "0.0.0.0",
|
57 |
-
# "--port", "7860",
|
58 |
-
# "--version='xinlai/LISA-13B-llama2-v1-explanatory'",
|
59 |
-
# "--precision='fp16'",
|
60 |
-
# "--load_in_4bit"
|
61 |
-
# ]
|
|
|
1 |
+
FROM python:3.12-bookworm
|
2 |
|
3 |
+
ARG PACKAGE_NAME="app_gradio_fastapi"
|
4 |
+
ARG ROOT_DIR="/code"
|
5 |
+
WORKDIR ${ROOT_DIR}
|
6 |
+
RUN chmod 770 -R ${ROOT_DIR}/
|
7 |
|
8 |
+
RUN pip install pip --upgrade
|
9 |
+
RUN python -m venv venv
|
10 |
+
RUN . ${ROOT_DIR}/venv/bin/activate && pip install --no-cache-dir fastapi gradio
|
11 |
|
12 |
+
COPY ./scripts ${ROOT_DIR}/scripts
|
13 |
+
COPY ./app.py ${ROOT_DIR}/app.py
|
14 |
+
COPY ./utils ${ROOT_DIR}/utils
|
|
|
15 |
|
16 |
+
RUN chmod +x ${ROOT_DIR}/scripts/entrypoint.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
EXPOSE 7860
|
19 |
|
20 |
+
CMD ["/code/scripts/entrypoint.sh"]
|
21 |
+
# CMD ["uvicorn", "wrappers.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|