text-classification / Dockerfile
tangminhanh's picture
Create Dockerfile
7113c1b verified
raw
history blame
546 Bytes
FROM python:3.10
# Set the working directory in the container
WORKDIR /app
# Copy the requirements.txt file into the container
COPY requirements.txt .
# Install any dependencies specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the working directory contents into the container
COPY . .
# Expose the port that the app runs on
EXPOSE 8000
# Define environment variable
ENV PYTHONUNBUFFERED=1
# Command to run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]