Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Update Dockerfile
Browse files- Dockerfile +11 -11
    	
        Dockerfile
    CHANGED
    
    | @@ -1,21 +1,21 @@ | |
| 1 | 
            -
            FROM python:3.9
         | 
| 2 |  | 
| 3 |  | 
| 4 | 
            -
            # Set up a new user named "user" with user ID 1000
         | 
| 5 | 
            -
            RUN useradd -m -u 1000 user
         | 
| 6 |  | 
| 7 | 
            -
            # Switch to the "user" user
         | 
| 8 | 
            -
            USER user
         | 
| 9 |  | 
| 10 |  | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
|  | |
|  | |
|  | |
|  | |
|  | |
| 13 |  | 
| 14 | 
            -
             | 
| 15 |  | 
| 16 | 
            -
            RUN pip install --upgrade pip
         | 
| 17 | 
            -
            RUN pip install -r requirements.txt
         | 
| 18 |  | 
|  | |
|  | |
| 19 |  | 
| 20 | 
             
            # Get secret EXAMPLE and output it to /test at buildtime
         | 
| 21 | 
             
            # RUN --mount=type=secret,id=EXAMPLE,mode=0444,required=true \
         | 
| @@ -25,4 +25,4 @@ RUN pip install -r requirements.txt | |
| 25 | 
             
            # RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true \
         | 
| 26 | 
             
            #   git clone $(cat /run/secrets/SECRET_EXAMPLE)
         | 
| 27 |  | 
| 28 | 
            -
            CMD ["uvicorn", " | 
|  | |
|  | |
| 1 |  | 
| 2 |  | 
|  | |
|  | |
| 3 |  | 
|  | |
|  | |
| 4 |  | 
| 5 |  | 
| 6 | 
            +
            FROM python:3.9
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            WORKDIR /code
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            COPY ./requirements.txt /code/requirements.txt
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
         | 
| 13 |  | 
| 14 | 
            +
            COPY ./main.py /code/app/main.py
         | 
| 15 |  | 
|  | |
|  | |
| 16 |  | 
| 17 | 
            +
            RUN mkdir -p /data
         | 
| 18 | 
            +
            RUN chmod 777 /data
         | 
| 19 |  | 
| 20 | 
             
            # Get secret EXAMPLE and output it to /test at buildtime
         | 
| 21 | 
             
            # RUN --mount=type=secret,id=EXAMPLE,mode=0444,required=true \
         | 
|  | |
| 25 | 
             
            # RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true \
         | 
| 26 | 
             
            #   git clone $(cat /run/secrets/SECRET_EXAMPLE)
         | 
| 27 |  | 
| 28 | 
            +
            CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
         |