Spaces:
Runtime error
Runtime error
File size: 974 Bytes
9baefed 028a988 8899772 d4d11d3 1fd28e5 d4d11d3 1fd28e5 c00f6cc 6b0f61e af9f7c5 d4d11d3 1fd28e5 9baefed af9f7c5 8899772 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# FROM python:3.9-slim
# WORKDIR /code
# # Copy requirements first to leverage caching
# COPY ./requirements.txt /code/requirements.txt
# # Create the cache directory with the appropriate permissions
# RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
# # Set the environment variable for the transformers cache
# ENV TRANSFORMERS_CACHE=/code/.cache
# # Install dependencies
# RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# # Copy application code
# COPY app.py .
# # Expose the application port
# EXPOSE 7860
# # Ensure the entrypoint is correct
# CMD ["python", "app.py"]
FROM python:3.9-slim
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
ENV TRANSFORMERS_CACHE=/code/.cache
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY app.py .
EXPOSE 8501
CMD ["streamlit", "run", "app.py", "--server.port", "8501", "--server.address", "0.0.0.0"]
|