multilang-embedding / Dockerfile
futranbg's picture
Update Dockerfile
41d96c7 verified
raw
history blame
798 Bytes
# Use an official Python runtime as a parent image
FROM python:3.10
# Set the working directory in the container
WORKDIR /app
# Set the working directory in the container
WORKDIR /app
# Install build dependencies required for fastbpe
RUN apt-get update && apt-get install -y build-essential
# Copy the requirements file into the container
COPY requirements.txt .
# Install the dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code into the container
COPY . .
# Copy the download script
COPY download_model.py .
# Pre-download the model at build time
RUN python download_model.py
# Expose the port your FastAPI app will run on
EXPOSE 7860
# Command to run the application using Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]