Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Dockerfile 533 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  1. # Use an official Python runtime as the base image
  2. FROM python:3.11-slim
  3. # Set the working directory in the container
  4. WORKDIR /app
  5. # Copy the requirements file into the container
  6. COPY requirements.txt .
  7. # Install the required packages
  8. RUN pip install --no-cache-dir -r requirements.txt
  9. # Copy the model files and application code
  10. COPY models/ models/
  11. COPY app.py .
  12. # Expose the port that FastAPI will run on
  13. EXPOSE 8000
  14. # Command to run the FastAPI application
  15. CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...