Spaces:
Sleeping
Sleeping
# 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"] | |