final_year / Dockerfile
jayasrees's picture
Initial commit
414e495
raw
history blame contribute delete
810 Bytes
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements files into the container
COPY requirements.txt .
COPY backend/requirements.txt backend/requirements.txt
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r backend/requirements.txt
# Copy the rest of the application's code into the container
COPY . .
# Make port 5000 available to the world outside this container
EXPOSE 5000
# Make port 8501 available for the streamlit app
EXPOSE 8501
# Define environment variable
ENV FLASK_APP=backend/app.py
# Run the Flask app and Streamlit app
CMD ["sh", "-c", "flask run --host=0.0.0.0 & streamlit run ui/app.py"]