Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -15
Dockerfile
CHANGED
|
@@ -1,34 +1,28 @@
|
|
| 1 |
-
# Use official Python slim image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Install system deps (git for clone)
|
| 5 |
RUN apt-get update && \
|
| 6 |
apt-get install -y git && \
|
| 7 |
rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# Install Python deps first
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
RUN git clone --depth 1 https://github.com/
|
| 17 |
-
cp -r /tmp/
|
| 18 |
-
rm -rf /tmp/
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
RUN
|
| 22 |
|
| 23 |
-
# Add your app
|
| 24 |
COPY app.py .
|
| 25 |
|
| 26 |
-
# Expose Streamlit port
|
| 27 |
EXPOSE 8501
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
| 33 |
|
| 34 |
CMD ["streamlit", "run", "app.py"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && \
|
| 4 |
apt-get install -y git && \
|
| 5 |
rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
|
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
+
# Clone correct TinyLLaVA source
|
| 13 |
+
RUN git clone --depth 1 https://github.com/DLCV-BUAA/TinyLLaVABench.git /tmp/tlv && \
|
| 14 |
+
cp -r /tmp/tlv/tinyllava ./tinyllava && \
|
| 15 |
+
rm -rf /tmp/tlv
|
| 16 |
|
| 17 |
+
# Check existence (optional debug)
|
| 18 |
+
RUN test -d ./tinyllava
|
| 19 |
|
|
|
|
| 20 |
COPY app.py .
|
| 21 |
|
|
|
|
| 22 |
EXPOSE 8501
|
| 23 |
|
| 24 |
+
ENV STREAMLIT_SERVER_HEADLESS=true \
|
| 25 |
+
STREAMLIT_SERVER_PORT=8501 \
|
| 26 |
+
STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
|
|
|
| 27 |
|
| 28 |
CMD ["streamlit", "run", "app.py"]
|