Spaces:
Running
Running
File size: 616 Bytes
9705a2a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
FROM python:3.9-slim
# WORKDIR /app
# COPY requirements.txt .
# RUN pip install --no-cache-dir -r requirements.txt
# COPY . .
# EXPOSE 8080
# CMD ["python", "app.py"]
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose the port your React app runs on
EXPOSE 7860
# Add ownership to the user
RUN chown -R 1001:1001 /app
# Change to the created user
USER 1001
# Command to run the application
CMD ["python", "app.py"] |