Spaces:
Running
Running
File size: 565 Bytes
ebf86ab b964b3a 82b01f1 b964b3a 82b01f1 ebf86ab b964b3a 82b01f1 b964b3a 82b01f1 b964b3a 82b01f1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
FROM python:3.12
# Set a working directory inside the container
WORKDIR /app
# Install required packages
RUN pip install tensorflow==2.16.2 fastapi uvicorn requests pillow python-multipart
# Ensure the application has a writable temp directory
RUN mkdir -p /app/temp && chmod 777 /app/temp
# Copy the FastAPI application code into the container
COPY . .
# Set environment variable for temporary files
ENV TMP_DIR=/app/temp
# Expose port for FastAPI
EXPOSE 7860
# Run the FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|