Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +22 -2
Dockerfile
CHANGED
@@ -1,7 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM python:3.9
|
|
|
|
|
2 |
WORKDIR /code
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
5 |
COPY ./app /code/app
|
|
|
|
|
6 |
EXPOSE 7860
|
7 |
-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
# FROM python:3.9
|
2 |
+
# WORKDIR /code
|
3 |
+
# COPY ./requirements.txt /code/requirements.txt
|
4 |
+
# RUN pip install --no-cache-dir -r requirements.txt
|
5 |
+
# COPY ./app /code/app
|
6 |
+
# EXPOSE 7860
|
7 |
+
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
8 |
FROM python:3.9
|
9 |
+
|
10 |
+
# Set working directory
|
11 |
WORKDIR /code
|
12 |
+
|
13 |
+
# Install system dependencies (if any)
|
14 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
15 |
+
some-package-needed-by-faiss-or-other-libraries \
|
16 |
+
&& rm -rf /var/lib/apt/lists/*
|
17 |
+
|
18 |
+
# Install Python dependencies
|
19 |
+
COPY requirements.txt .
|
20 |
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
+
|
22 |
+
# Copy application files
|
23 |
COPY ./app /code/app
|
24 |
+
|
25 |
+
# Expose port and define command to run the app
|
26 |
EXPOSE 7860
|
27 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|