File size: 990 Bytes
664ad4d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 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.address=0.0.0.0"]