File size: 759 Bytes
a8a5982 2e427ef a8a5982 2e427ef a8a5982 cf58b28 2e427ef a8a5982 | 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 | # Use full Python image instead of slim
FROM python:3.11
# Set working directory
WORKDIR /app
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 - && \
ln -s /root/.local/bin/poetry /usr/local/bin/poetry
# Copy only requirements first to leverage Docker cache
COPY pyproject.toml poetry.lock ./
# Configure Poetry to not create a virtual environment in the container
RUN poetry config virtualenvs.create false
# Copy the rest of the application
COPY . .
# Install dependencies and the package itself
RUN poetry install --only main --no-interaction --no-ansi
# Expose the port Streamlit runs on
EXPOSE 8501
# Command to run the application
CMD ["streamlit", "run", "hype_pack/streamlit_app.py", "--server.address=0.0.0.0"] |