lottonautica/Dockerfile

35 lines
964 B
Text
Raw Permalink Normal View History

2025-02-17 10:35:06 +02:00
# Use Python 3.12-slim as the base image
2025-02-17 10:17:48 +02:00
FROM python:3.12-slim
# Set the working directory in the container
WORKDIR /app
2025-02-17 10:35:06 +02:00
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt requirements.txt
# Upgrade pip and install dependencies
RUN pip install --no-cache-dir -U pip && pip install --no-cache-dir -r requirements.txt
2025-02-17 10:17:48 +02:00
2025-02-17 10:35:06 +02:00
# Create a fake sudo command to bypass sudo errors
RUN echo '#!/bin/sh\nexec "$@"' > /usr/bin/sudo && chmod +x /usr/bin/sudo
# Clone and install TemporalLib
RUN git clone --depth 1 https://github.com/TheRandonauts/temporal.git /app/temporal \
&& cd /app/temporal \
&& ./make.sh \
&& rm -rf /app/temporal
# Copy application files
COPY . .
2025-02-17 10:17:48 +02:00
# Expose Streamlit's default port
EXPOSE 8501
2025-02-17 10:35:06 +02:00
# Run the application
2025-02-17 10:17:48 +02:00
CMD ["streamlit", "run", "main.py", "--server.port=8501", "--server.address=0.0.0.0"]