r0m4k commited on
Commit
9cf7928
·
verified ·
1 Parent(s): 5f40eaa

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -10
Dockerfile CHANGED
@@ -1,23 +1,31 @@
1
- # Use an official NVIDIA CUDA base image, which is great for PyTorch and GPU-heavy tasks
2
  FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime
3
 
4
- # Set the working directory in the container
5
  WORKDIR /code
6
 
7
- # Copy the requirements file into the container
 
 
 
 
 
 
 
 
 
 
 
8
  COPY ./requirements.txt /code/requirements.txt
9
 
10
- # Install dependencies from requirements.txt
11
- # --no-cache-dir ensures a smaller image size
12
- # --upgrade ensures we get the latest specified versions
13
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
14
 
15
- # Copy all your application files (app.py, train.py, and your CSVs) into the container
16
  COPY . /code/
17
 
18
- # Tell the container to expose port 7860, which is the default for Gradio
19
  EXPOSE 7860
20
 
21
- # The command to run when the container starts.
22
- # This will launch your Gradio app.
23
  CMD ["python", "app.py"]
 
1
+ # Use an official NVIDIA CUDA base image
2
  FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime
3
 
4
+ # Set the working directory
5
  WORKDIR /code
6
 
7
+ # [FIX] Install wget and other common utilities first
8
+ # Running apt-get update before install is crucial
9
+ RUN apt-get update && apt-get install -y wget git
10
+
11
+ # [NEW] Now, run your command to install OpenVSCode Server
12
+ RUN wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.86.2/openvscode-server-v1.86.2-linux-x64.tar.gz -O /tmp/openvscode-server.tar.gz && \
13
+ tar -xzf /tmp/openvscode-server.tar.gz -C /opt && \
14
+ rm /tmp/openvscode-server.tar.gz && \
15
+ mv /opt/openvscode-server-v1.86.2-linux-x64 /opt/openvscode-server && \
16
+ chown -R 1000:1000 /opt/openvscode-server
17
+
18
+ # Copy the requirements file
19
  COPY ./requirements.txt /code/requirements.txt
20
 
21
+ # Install Python dependencies
 
 
22
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
23
 
24
+ # Copy your application files
25
  COPY . /code/
26
 
27
+ # Expose the default Gradio port
28
  EXPOSE 7860
29
 
30
+ # The command to run when the container starts
 
31
  CMD ["python", "app.py"]