Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +2 -21
Dockerfile
CHANGED
@@ -1,26 +1,7 @@
|
|
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 |
-
&& rm -rf /var/lib/apt/lists/*
|
16 |
-
|
17 |
-
# Install Python dependencies
|
18 |
-
COPY requirements.txt .
|
19 |
RUN pip install --no-cache-dir -r requirements.txt
|
20 |
-
|
21 |
-
# Copy application files
|
22 |
COPY ./app /code/app
|
23 |
-
|
24 |
-
# Expose port and define command to run the app
|
25 |
EXPOSE 7860
|
26 |
-
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"]
|