Spaces:
Sleeping
Sleeping
Commit ·
e63e1eb
1
Parent(s): 4f37c86
MInimized docker image size
Browse files- Dockerfile +2 -18
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
@@ -7,27 +7,11 @@ RUN mkdir ${HF_HOME} \
|
|
| 7 |
&& chmod 775 ${HF_HOME}
|
| 8 |
|
| 9 |
ENV HF_HOME=${HF_HOME}
|
| 10 |
-
# DO NOT USE: Depreccated
|
| 11 |
-
# ENV TRANSFORMERS_CACHE="/app/.cache"
|
| 12 |
-
|
| 13 |
-
RUN apt update \
|
| 14 |
-
&& apt install python3.10 pip -y \
|
| 15 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
-
|
| 17 |
-
# # Install problematic flash attention from source
|
| 18 |
-
# RUN apt update \
|
| 19 |
-
# && apt install git -y \
|
| 20 |
-
# && rm -rf /var/lib/apt/lists/*
|
| 21 |
-
|
| 22 |
-
# RUN pip install git+https://github.com/Dao-AILab/flash-attention.git
|
| 23 |
|
| 24 |
COPY requirements.txt .
|
| 25 |
-
RUN
|
| 26 |
|
| 27 |
COPY . .
|
| 28 |
|
| 29 |
-
# Expose the port that the application listens on.
|
| 30 |
-
EXPOSE 8000
|
| 31 |
-
|
| 32 |
# Run the application.
|
| 33 |
CMD streamlit run inference_main.py --server.port 7860
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 7 |
&& chmod 775 ${HF_HOME}
|
| 8 |
|
| 9 |
ENV HF_HOME=${HF_HOME}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
COPY requirements.txt .
|
| 12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
COPY . .
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
# Run the application.
|
| 17 |
CMD streamlit run inference_main.py --server.port 7860
|