Update Dockerfile
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
@@ -13,19 +13,19 @@ ENV STREAMLIT_CONFIG_DIR=/app/.streamlit \
|
|
13 |
XDG_CACHE_HOME=/app/.cache \
|
14 |
STREAMLIT_HOME=/app/.cache/streamlit
|
15 |
|
16 |
-
# 4. Create directories with correct permissions
|
17 |
RUN mkdir -p /app/.streamlit \
|
18 |
&& mkdir -p /app/.cache/huggingface/hub \
|
19 |
&& mkdir -p /app/.cache/streamlit \
|
20 |
-
&& chmod -R 777 /app/.cache /app/.streamlit
|
|
|
21 |
|
22 |
# 5. Copy in dependency file and install
|
23 |
COPY requirements.txt .
|
24 |
RUN pip install --no-cache-dir -r requirements.txt
|
25 |
|
26 |
-
# 6. Copy your source app code
|
27 |
COPY src/ ./src
|
28 |
-
COPY .streamlit/ /app/.streamlit/
|
29 |
|
30 |
# 7. Expose Streamlit default port
|
31 |
EXPOSE 8501
|
|
|
13 |
XDG_CACHE_HOME=/app/.cache \
|
14 |
STREAMLIT_HOME=/app/.cache/streamlit
|
15 |
|
16 |
+
# 4. Create directories with correct permissions and inject Streamlit config
|
17 |
RUN mkdir -p /app/.streamlit \
|
18 |
&& mkdir -p /app/.cache/huggingface/hub \
|
19 |
&& mkdir -p /app/.cache/streamlit \
|
20 |
+
&& chmod -R 777 /app/.cache /app/.streamlit \
|
21 |
+
&& printf '[browser]\ngatherUsageStats = false\n\n[server]\nheadless = true\nenableCORS = false\nport = 8501\n' > /app/.streamlit/config.toml
|
22 |
|
23 |
# 5. Copy in dependency file and install
|
24 |
COPY requirements.txt .
|
25 |
RUN pip install --no-cache-dir -r requirements.txt
|
26 |
|
27 |
+
# 6. Copy your source app code
|
28 |
COPY src/ ./src
|
|
|
29 |
|
30 |
# 7. Expose Streamlit default port
|
31 |
EXPOSE 8501
|