Spaces:
Runtime error
Runtime error
Ravi Pandey
commited on
Commit
•
12b3d87
1
Parent(s):
89c340e
Docker deploy
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
@@ -1,13 +1,17 @@
|
|
1 |
FROM python:3.9
|
2 |
|
|
|
3 |
WORKDIR /code
|
4 |
|
|
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
-
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
9 |
-
|
|
|
10 |
|
|
|
11 |
COPY . .
|
12 |
|
|
|
13 |
CMD ["uvicorn", "server.caption_server:app", "--reload", "--port", "8000"]
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
# Set working directory
|
4 |
WORKDIR /code
|
5 |
|
6 |
+
# Copy requirements file and install dependencies
|
7 |
COPY ./requirements.txt /code/requirements.txt
|
|
|
8 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
9 |
|
10 |
+
# Set environment variable for Transformers cache
|
11 |
+
ENV TRANSFORMERS_CACHE=/code/.cache
|
12 |
|
13 |
+
# Copy the rest of the application code
|
14 |
COPY . .
|
15 |
|
16 |
+
# Command to run your application
|
17 |
CMD ["uvicorn", "server.caption_server:app", "--reload", "--port", "8000"]
|