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 646 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
22
23
24
  1. # Use a lightweight FastAPI-optimized image
  2. FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10-slim
  3. # Upgrade pip
  4. RUN pip install --no-cache-dir --upgrade pip
  5. # Set the working directory
  6. WORKDIR /code
  7. # Copy dependencies file and install required packages
  8. COPY app/api_requirements.txt .
  9. RUN pip install --no-cache-dir --upgrade -r api_requirements.txt
  10. # Copy application and model files
  11. COPY ./app /code/app
  12. COPY ./app/weather_disease_model.pkl .
  13. COPY ./app/minmax_scaler.pkl .
  14. COPY ./app/label_encoder.pkl .
  15. # Expose port
  16. EXPOSE 9696
  17. # Run the FastAPI app with Uvicorn
  18. CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "9696"]
Tip!

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

Comments

Loading...