Update Dockerfile
Browse files- Dockerfile +9 -5
Dockerfile
CHANGED
|
@@ -1,16 +1,20 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install git
|
| 6 |
-
RUN apt-get update &&
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Install Python dependencies
|
| 9 |
COPY requirements.txt .
|
| 10 |
-
RUN pip install --no-cache-dir -
|
|
|
|
| 11 |
|
| 12 |
-
# Copy
|
| 13 |
COPY app.py .
|
| 14 |
|
| 15 |
-
# Start
|
| 16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Install git and build tools
|
| 7 |
+
RUN apt-get update && \
|
| 8 |
+
apt-get install -y git build-essential && \
|
| 9 |
+
apt-get clean
|
| 10 |
|
| 11 |
# Install Python dependencies
|
| 12 |
COPY requirements.txt .
|
| 13 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
| 14 |
+
pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
+
# Copy application code
|
| 17 |
COPY app.py .
|
| 18 |
|
| 19 |
+
# Start the app
|
| 20 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|