Spaces:
Runtime error
Runtime error
updated dockerfile to grant users access to the history.csv file
Browse files- Dockerfile +5 -9
Dockerfile
CHANGED
@@ -1,28 +1,24 @@
|
|
1 |
-
|
2 |
-
|
3 |
FROM python:3.9
|
4 |
|
5 |
-
|
6 |
WORKDIR /code
|
7 |
|
8 |
# Create a writable directory for the cache
|
9 |
RUN mkdir -p /.cache/huggingface/hub && chmod -R 777 /.cache
|
10 |
|
11 |
-
|
12 |
-
|
13 |
# Set the TRANSFORMERS_CACHE environment variable
|
14 |
ENV TRANSFORMERS_CACHE /.cache/huggingface/hub
|
15 |
|
16 |
-
|
17 |
COPY ./requirements.txt /code/requirements.txt
|
18 |
|
19 |
RUN pip3 install --upgrade pip
|
20 |
|
21 |
RUN pip3 install -r requirements.txt
|
22 |
|
23 |
-
#
|
24 |
COPY ./src /code/src
|
25 |
|
26 |
-
#
|
27 |
-
|
28 |
|
|
|
|
|
|
|
|
|
|
1 |
FROM python:3.9
|
2 |
|
|
|
3 |
WORKDIR /code
|
4 |
|
5 |
# Create a writable directory for the cache
|
6 |
RUN mkdir -p /.cache/huggingface/hub && chmod -R 777 /.cache
|
7 |
|
|
|
|
|
8 |
# Set the TRANSFORMERS_CACHE environment variable
|
9 |
ENV TRANSFORMERS_CACHE /.cache/huggingface/hub
|
10 |
|
|
|
11 |
COPY ./requirements.txt /code/requirements.txt
|
12 |
|
13 |
RUN pip3 install --upgrade pip
|
14 |
|
15 |
RUN pip3 install -r requirements.txt
|
16 |
|
17 |
+
# Copy the source code
|
18 |
COPY ./src /code/src
|
19 |
|
20 |
+
# Change permissions of the history.csv file
|
21 |
+
RUN chmod 777 /code/src/app/../assets/history.csv
|
22 |
|
23 |
+
# Run the app
|
24 |
+
CMD ["streamlit", "run", "src/app/app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|