Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
# Use Python as base image
|
2 |
FROM python:3.10
|
3 |
|
4 |
-
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Copy
|
8 |
-
COPY . /app
|
9 |
|
10 |
-
# Install dependencies
|
11 |
-
RUN pip install --no-cache-dir fastapi uvicorn torch
|
12 |
|
13 |
-
# Expose
|
14 |
EXPOSE 7860
|
15 |
|
16 |
-
#
|
17 |
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
# Use an official Python runtime as the base image
|
2 |
FROM python:3.10
|
3 |
|
4 |
+
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy the FastAPI application code
|
8 |
+
COPY server.py /app/server.py
|
9 |
|
10 |
+
# Install necessary dependencies
|
11 |
+
RUN pip install --no-cache-dir fastapi uvicorn transformers torch sentencepiece
|
12 |
|
13 |
+
# Expose the FastAPI port
|
14 |
EXPOSE 7860
|
15 |
|
16 |
+
# Run the FastAPI server
|
17 |
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|