transcript2notes / Dockerfile
fracapuano
fix: AxiosError when uploading file
8950e7b
# Use an official Python runtime as a base image
FROM python:3.12
# Set the HOME environment variable and make /home directory world-writable
ENV HOME=/home
RUN mkdir -p $HOME && chmod 777 $HOME
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy the current directory contents into the container at /usr/src/app
COPY pyproject.toml poetry.lock* /usr/src/app/
# Install Poetry
RUN pip install -U pip
RUN pip install poetry
# Configure Poetry: Do not create a virtual environment
RUN poetry config virtualenvs.create false
# Install project dependencies
RUN poetry install
# Copy the rest of your app's source code from your host to your image filesystem.
COPY . /usr/src/app
# This is the port exposed by the container
EXPOSE 7860
# Checking the container is still working
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
# The command to run the app
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]