Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +23 -20
Dockerfile
CHANGED
@@ -1,20 +1,23 @@
|
|
1 |
-
# Base image
|
2 |
-
FROM python:3.10-slim
|
3 |
-
|
4 |
-
# Set working directory
|
5 |
-
WORKDIR /app
|
6 |
-
|
7 |
-
# Copy project files
|
8 |
-
COPY . .
|
9 |
-
|
10 |
-
# Install system dependencies
|
11 |
-
RUN apt-get update && apt-get install -y libfaiss-dev && rm -rf /var/lib/apt/lists/*
|
12 |
-
|
13 |
-
# Install Python dependencies
|
14 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
1 |
+
# Base image
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Set working directory
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy project files
|
8 |
+
COPY . .
|
9 |
+
|
10 |
+
# Install system dependencies
|
11 |
+
RUN apt-get update && apt-get install -y libfaiss-dev && rm -rf /var/lib/apt/lists/*
|
12 |
+
|
13 |
+
# Install Python dependencies
|
14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
+
|
16 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
17 |
+
# Expose the application port
|
18 |
+
EXPOSE 8000
|
19 |
+
|
20 |
+
# Run the application
|
21 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
22 |
+
|
23 |
+
|