Spaces:
Runtime error
Runtime error
# FROM python:3.10 | |
# WORKDIR /code | |
# COPY ./requirements.txt /code/requirements.txt | |
# RUN apt-get update && xargs -r -a /packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* | |
# RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt | |
# # we are using open AI here. no need to download model | |
# # RUN python3 -c 'from transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLM;model=AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn");model.save_pretrained("models");tokenizer=AutoTokenizer.from_pretrained("facebook/bart-large-cnn");tokenizer.save_pretrained("models")' | |
# # COPY ./app /code/app | |
# EXPOSE 8501 | |
# CMD streamlit run app.py \ | |
# --server.headless true \ | |
# --server.enableCORS false \ | |
# --server.enableXsrfProtection false \ | |
# --server.fileWatcherType none | |
FROM python:3.9 | |
WORKDIR /app | |
COPY requirements.txt ./requirements.txt | |
RUN pip install -r requirements.txt | |
EXPOSE 8501 | |
# Set up a new user named "user" with user ID 1000 | |
RUN useradd -m -u 1000 user | |
# Switch to the "user" user | |
USER user | |
# Set home to the user's home directory | |
ENV HOME=/home/user | |
ENV PATH=/home/user/.local/bin:$PATH | |
# Set the working directory to the user's home directory | |
WORKDIR $HOME | |
RUN mkdir app | |
WORKDIR $HOME/app | |
COPY . $HOME/app | |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user | |
COPY --chown=user . $HOME/app | |
# ENTRYPOINT ["streamlit", "run"] | |
# CMD ["app.py", "--server.port", "7860", "--server.enableCORS, false", "--server.enableXsrfProtection, false", "--server.fileWatcherType, none"] | |
CMD streamlit run app.py \ | |
--server.port 7860 \ | |
--server.headless true \ | |
--server.enableCORS false \ | |
--server.enableXsrfProtection false \ | |
--server.fileWatcherType none | |