Update Dockerfile
Browse files- Dockerfile +1 -12
Dockerfile
CHANGED
@@ -1,25 +1,14 @@
|
|
1 |
-
# Use a Python image as the base image
|
2 |
FROM python:3.9-slim
|
3 |
-
|
4 |
-
# Set working directory inside the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Set environment variables to specify where to store the cache and Streamlit configuration
|
8 |
ENV STREAMLIT_HOME=/app/.streamlit
|
9 |
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
|
10 |
-
|
11 |
-
# Create directories for Streamlit and Hugging Face cache to ensure they're writable
|
12 |
RUN mkdir -p /app/.streamlit /app/.cache/huggingface/hub
|
13 |
|
14 |
-
# Install dependencies from requirements.txt
|
15 |
COPY requirements.txt .
|
16 |
RUN pip install --no-cache-dir -r requirements.txt
|
17 |
|
18 |
-
# Copy the rest of your application files into the container
|
19 |
COPY . .
|
20 |
|
21 |
-
# Expose the port Streamlit will run on
|
22 |
EXPOSE 8501
|
23 |
-
|
24 |
-
# Command to run the app
|
25 |
-
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
|
1 |
FROM python:3.9-slim
|
|
|
|
|
2 |
WORKDIR /app
|
3 |
|
|
|
4 |
ENV STREAMLIT_HOME=/app/.streamlit
|
5 |
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
|
|
|
|
|
6 |
RUN mkdir -p /app/.streamlit /app/.cache/huggingface/hub
|
7 |
|
|
|
8 |
COPY requirements.txt .
|
9 |
RUN pip install --no-cache-dir -r requirements.txt
|
10 |
|
|
|
11 |
COPY . .
|
12 |
|
|
|
13 |
EXPOSE 8501
|
14 |
+
CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|