hassan526 commited on
Commit
dcb1c6d
·
verified ·
1 Parent(s): 59234d3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -11
Dockerfile CHANGED
@@ -1,16 +1,27 @@
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
- RUN useradd -m -u 1000 user
7
- USER user
8
- ENV PATH="/home/user/.local/bin:$PATH"
9
 
10
- WORKDIR /app
 
11
 
12
- COPY --chown=user ./requirements.txt requirements.txt
13
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
15
- COPY --chown=user . /app
16
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:20.04
 
2
 
3
+ # Set the timezone of the container
4
+ ENV CONTAINER_TIMEZONE=UTC
5
+ RUN ln -snf /usr/share/zoneinfo/$CONTAINER_TIMEZONE /etc/localtime && echo $CONTAINER_TIMEZONE > /etc/timezone
6
 
7
+ # Create directory for the application
8
+ RUN mkdir -p /home/recognito_fl
 
9
 
10
+ # Set the working directory
11
+ WORKDIR /home/recognito_fl
12
 
13
+ # Copy the application files into the container
14
+ COPY . .
15
 
16
+ # Make the scripts executable
17
+ RUN chmod +x install.sh run_demo.sh
18
+
19
+ # Run the install.sh script to perform any installation tasks
20
+ RUN apt-get update && apt-get install -y sudo
21
+ RUN ./install.sh
22
+
23
+ # Expose port 8000(flask), 7860(gradio)
24
+ EXPOSE 8000 7860
25
+
26
+ # Set the default command to run the application
27
+ CMD ["./run_demo.sh"]