Spaces:
Sleeping
Sleeping
AbdelhamidKHELLADI commited on
Commit ·
8ec7f4e
1
Parent(s): 4011904
Fix Streamlit permission issue
Browse files- .streamlit/confug.toml +2 -0
- Dockerfile +10 -6
.streamlit/confug.toml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[general]
|
| 2 |
+
logLevel = "info"
|
Dockerfile
CHANGED
|
@@ -1,18 +1,22 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
COPY requirements_hf.txt .
|
| 7 |
|
| 8 |
-
RUN apt-get update && apt-get install -y libgomp1 && rm -rf /var/lib/apt/lists/*
|
| 9 |
-
|
| 10 |
pip install --no-cache-dir -r requirements_hf.txt
|
| 11 |
-
|
| 12 |
-
COPY streamlit_app.py .
|
| 13 |
COPY models/mobilenetv3_catsdogs_quantized_static.onnx ./models/
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
|
|
|
| 15 |
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
-
CMD ["streamlit", "run", "
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
COPY requirements_hf.txt .
|
| 6 |
|
| 7 |
+
RUN apt-get update && apt-get install -y libgomp1 && rm -rf /var/lib/apt/lists/*
|
| 8 |
+
RUN pip install --upgrade pip && \
|
| 9 |
pip install --no-cache-dir -r requirements_hf.txt
|
| 10 |
+
|
| 11 |
+
COPY streamlit_app.py .
|
| 12 |
COPY models/mobilenetv3_catsdogs_quantized_static.onnx ./models/
|
| 13 |
+
COPY .streamlit ./ .streamlit
|
| 14 |
+
|
| 15 |
+
ENV STREAMLIT_HOME=/app/.streamlit
|
| 16 |
+
ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
|
| 17 |
|
| 18 |
+
RUN mkdir -p /app/.streamlit && chmod -R 777 /app/.streamlit
|
| 19 |
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
+
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|