mohsinabbas1984's picture
Update Dockerfile
4f78022 verified
raw
history blame contribute delete
805 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9
# Set the working directory to /app
WORKDIR /app
# Copy the backend requirements file and install any needed packages
COPY backend/requirements.txt /app/backend/requirements.txt
RUN pip install --no-cache-dir -r /app/backend/requirements.txt
# Copy the backend code
COPY backend /app/backend
# Copy the frontend requirements file and install any needed packages
COPY frontend/requirements.txt /app/frontend/requirements.txt
RUN pip install --no-cache-dir -r /app/frontend/requirements.txt
# Copy the frontend code
COPY frontend /app/frontend
# Expose necessary ports
EXPOSE 8000 8501
# Start both services using a script
CMD ["bash", "-c", "uvicorn backend.main:app --host 0.0.0.0 --port 8000 & streamlit run /app/frontend/app.py"]