Spaces:
Runtime error
Runtime error
File size: 564 Bytes
83813ad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Use the official Python image as the base image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install necessary dependencies
RUN apt-get update && apt-get install -y libgl1-mesa-glx && \
pip install --no-cache-dir flask pymongo opencv-python-headless tensorflow==2.15.0
# Expose port 5000 to the outside world
EXPOSE 5000
# Define environment variable
ENV FLASK_APP=app.py
# Run the Flask application
CMD ["flask", "run", "--host=0.0.0.0"]
|