travis_login / Dockerfile
vinay0123's picture
Update Dockerfile
3720de7 verified
Raw
History Blame Contribute Delete
447 Bytes
# Base image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Copy requirement files
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the code
COPY . .
# Expose port (Spaces expects 7860 or 5000)
EXPOSE 5001
# Set environment variable for Flask
ENV FLASK_APP=app.py
ENV FLASK_RUN_PORT=5001
ENV FLASK_RUN_HOST=0.0.0.0
# Run the Flask app
CMD ["python", "app.py"]