Spaces:
Runtime error
Runtime error
rajeshradhakrishnan
commited on
Commit
•
74a5927
1
Parent(s):
86fc43c
English-Malayalam Translate v8
Browse files- Dockerfile +4 -17
Dockerfile
CHANGED
@@ -1,28 +1,15 @@
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
-
#https://huggingface.co/spaces/DockerTemplates/fastapi_dummy/blob/main/requirements.txt
|
4 |
|
5 |
FROM python:3.9
|
6 |
|
|
|
7 |
|
8 |
-
|
9 |
-
USER user
|
10 |
-
# Set home to the user's home directory
|
11 |
-
ENV HOME=/home/user \
|
12 |
-
PATH=/home/user/.local/bin:$PATH
|
13 |
-
WORKDIR $HOME/app
|
14 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
15 |
-
COPY --chown=user . $HOME/app
|
16 |
-
ADD --chown=user ./.translate_cache $HOME/app/.translate_cache
|
17 |
-
RUN chown user:user -R $HOME/app
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
COPY ./requirements.txt $HOME/app/requirements.txt
|
24 |
-
|
25 |
-
RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt
|
26 |
|
27 |
COPY . .
|
28 |
|
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
|
|
3 |
|
4 |
FROM python:3.9
|
5 |
|
6 |
+
WORKDIR /code
|
7 |
|
8 |
+
ARG TRANSFORMERS_CACHE=/code/translate_cache
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
COPY ./requirements.txt /code/requirements.txt
|
11 |
|
12 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
|
|
|
|
|
|
|
13 |
|
14 |
COPY . .
|
15 |
|