linked / Dockerfile
Archit Sharma
update dockerfile build
a333284 unverified
raw
history blame contribute delete
837 Bytes
# Build stage
FROM python:3.11 as builder
WORKDIR /build
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY . .
# Build your application, if needed
# RUN python build.py
# Final stage
FROM python:3.11-slim-buster
COPY --from=builder /build /app
WORKDIR /app
# Copy installed dependencies from the builder stage
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
# Copy the Streamlit executable
COPY --from=builder /usr/local/bin/streamlit /usr/local/bin/streamlit
# Expose the desired port
EXPOSE 7860
# Set the appropriate command to run Streamlit
# CMD ["streamlit", "run", "app/main.py", "--server.enableCORS", "false", "--server.port", "7860"]
CMD ["streamlit", "run", "app/main.py", "--server.port", "7860"]