Spaces:
Runtime error
Runtime error
peace4ever
commited on
Commit
•
028a988
1
Parent(s):
8a0fb54
Update Dockerfile
Browse files- Dockerfile +2 -12
Dockerfile
CHANGED
@@ -22,29 +22,19 @@
|
|
22 |
|
23 |
# # Ensure the entrypoint is correct
|
24 |
# CMD ["python", "app.py"]
|
|
|
|
|
25 |
FROM python:3.9-slim
|
26 |
|
27 |
WORKDIR /code
|
28 |
|
29 |
-
# Copy requirements first to leverage caching
|
30 |
COPY ./requirements.txt /code/requirements.txt
|
31 |
-
|
32 |
-
# Create the cache directory with the appropriate permissions
|
33 |
RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
|
34 |
-
|
35 |
-
# Set the environment variable for the transformers cache
|
36 |
ENV TRANSFORMERS_CACHE=/code/.cache
|
37 |
-
|
38 |
-
# Install dependencies
|
39 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
40 |
|
41 |
-
# Copy application code
|
42 |
COPY app.py .
|
43 |
-
|
44 |
-
# Expose the Streamlit default port
|
45 |
EXPOSE 8501
|
46 |
-
|
47 |
-
# Command to run the Streamlit app
|
48 |
CMD ["streamlit", "run", "app.py", "--server.port", "8501", "--server.address", "0.0.0.0"]
|
49 |
|
50 |
|
|
|
22 |
|
23 |
# # Ensure the entrypoint is correct
|
24 |
# CMD ["python", "app.py"]
|
25 |
+
|
26 |
+
|
27 |
FROM python:3.9-slim
|
28 |
|
29 |
WORKDIR /code
|
30 |
|
|
|
31 |
COPY ./requirements.txt /code/requirements.txt
|
|
|
|
|
32 |
RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
|
|
|
|
|
33 |
ENV TRANSFORMERS_CACHE=/code/.cache
|
|
|
|
|
34 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
35 |
|
|
|
36 |
COPY app.py .
|
|
|
|
|
37 |
EXPOSE 8501
|
|
|
|
|
38 |
CMD ["streamlit", "run", "app.py", "--server.port", "8501", "--server.address", "0.0.0.0"]
|
39 |
|
40 |
|