Spaces:
Running
Running
File size: 782 Bytes
0b2cdc6 1ed0bc7 0b2cdc6 1ed0bc7 0b2cdc6 1ed0bc7 0b2cdc6 035d560 0b2cdc6 32b8265 0b2cdc6 |
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 |
# FROM python:3.9
# WORKDIR /code
# COPY ./requirements.txt /code/requirements.txt
# RUN pip install --no-cache-dir -r requirements.txt
# COPY ./app /code/app
# EXPOSE 7860
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
FROM python:3.9
# Set working directory
WORKDIR /code
# Install system dependencies (if any)
RUN apt-get update && apt-get install -y --no-install-recommends \
some-package-needed-by-faiss-or-other-libraries \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY ./app /code/app
# Expose port and define command to run the app
EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|