24 lines
386 B
Text
24 lines
386 B
Text
|
# Set base image
|
||
|
FROM python:3.9-slim-buster
|
||
|
|
||
|
# Set work directory
|
||
|
WORKDIR /app
|
||
|
|
||
|
# Copy requirements file
|
||
|
COPY requirements.txt .
|
||
|
|
||
|
# Install dependencies
|
||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||
|
|
||
|
# Copy app file
|
||
|
COPY main.py .
|
||
|
|
||
|
# Set environment variables
|
||
|
ENV PORT 8501
|
||
|
|
||
|
# Expose port
|
||
|
EXPOSE 8501
|
||
|
|
||
|
# Run Streamlit app
|
||
|
CMD ["streamlit", "run", "--server.port=8501", "main.py"]
|