Update Dockerfile
Browse files- Dockerfile +15 -9
Dockerfile
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
-
FROM
|
2 |
-
RUN apt-get update
|
3 |
-
RUN apt-get
|
4 |
-
|
|
|
|
|
|
|
|
|
5 |
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
|
6 |
-
RUN --mount=target=/tmp/packages.txt,source=packages.txt apt-get update && xargs -r -a /tmp/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
|
7 |
WORKDIR /home/user/app
|
8 |
-
RUN pip install --no-cache-dir pip==22.3.1 &&
|
9 |
RUN pip freeze > /tmp/freeze.txt
|
10 |
-
RUN pip install --no-cache-dir
|
11 |
COPY --link --chown=1000 ./ /home/user/app
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
1 |
+
FROM ubuntu:22.04
|
2 |
+
RUN apt-get update
|
3 |
+
RUN apt-get install -y python3.10
|
4 |
+
RUN apt-get install python3-pip -y
|
5 |
+
RUN useradd -m -u 1001 user
|
6 |
+
RUN apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1-mesa-glx
|
7 |
+
RUN git lfs install
|
8 |
+
RUN --mount=target=/tmp/packages.txt,source=packages.txt apt-get update && xargs -r -a /tmp/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
|
9 |
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
|
|
|
10 |
WORKDIR /home/user/app
|
11 |
+
RUN pip install --no-cache-dir pip==22.3.1 && pip install --no-cache-dir datasets "huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
|
12 |
RUN pip freeze > /tmp/freeze.txt
|
13 |
+
RUN pip install --no-cache-dir gradio[oauth]==4.38.1 "uvicorn>=0.14.0" spaces
|
14 |
COPY --link --chown=1000 ./ /home/user/app
|
15 |
+
#EXPOSE 7860
|
16 |
+
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
17 |
+
ENV GRADIO_SERVER_PORT=7860
|
18 |
+
COPY app.py .
|
19 |
+
CMD ["python3", "app.py"]
|