Spaces:
Running
Running
File size: 446 Bytes
2534d77 88ab602 715c3ae 88ab602 715c3ae 2534d77 88ab602 715c3ae |
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.10
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PORT=8000 \
HF_HOME=/home/user/huggingface
# Create necessary folders
RUN mkdir -p /home/user/huggingface
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app files
COPY . .
# Expose the port
EXPOSE $PORT
# Run the FastAPI app with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|