rockerritesh commited on
Commit
b89dcc8
·
verified ·
1 Parent(s): 676a0f9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -23
Dockerfile CHANGED
@@ -1,30 +1,18 @@
 
1
  FROM python:3.9-slim
2
 
3
- # Install system dependencies
4
- RUN apt-get update && apt-get install -y \
5
- sudo \
6
- curl \
7
- pciutils \
8
- lshw \
9
- && apt-get clean \
10
- && rm -rf /var/lib/apt/lists/*
11
-
12
- # Install Ollama
13
- RUN curl -fsSL https://ollama.com/install.sh | sh
14
-
15
- # Install Python dependencies
16
- COPY requirements.txt /app/requirements.txt
17
  WORKDIR /app
18
- RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Copy application code
21
- COPY . /app
 
22
 
23
- # Pull necessary model
24
- RUN ollama pull snowflake-arctic-embed2
25
 
26
- # Expose port for Gradio app
27
- EXPOSE 7860
28
 
29
- # Command to run the app
30
- CMD ["python", "app.py"]
 
1
+ # Use an official Python runtime as a parent image
2
  FROM python:3.9-slim
3
 
4
+ # Set the working directory
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  WORKDIR /app
 
6
 
7
+ # Copy the requirements file and install dependencies
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Copy the application code
12
+ COPY main.py .
13
 
14
+ # Expose the port FastAPI will run on
15
+ EXPOSE 8000
16
 
17
+ # Command to run the FastAPI app
18
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]