Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -9
Dockerfile
CHANGED
@@ -1,20 +1,14 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
# Set the working directory
|
4 |
WORKDIR /code
|
5 |
|
6 |
-
# Copy the 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 |
-
|
11 |
-
ENV TRANSFORMERS_CACHE=/code/huggingface_cache
|
12 |
|
13 |
-
# Copy the application code
|
14 |
COPY ./app.py /code/app.py
|
15 |
|
16 |
-
#
|
17 |
-
|
18 |
|
19 |
-
# Run the application with Uvicorn
|
20 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
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 |
COPY ./app.py /code/app.py
|
10 |
|
11 |
+
# Ensure /code has the correct permissions
|
12 |
+
RUN chmod -R 777 /code
|
13 |
|
|
|
14 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|